# 在使用Spring默认数据源Hikari的情况下配置以下配置项
|
spring:
|
security:
|
user:
|
name: actuator_admin # 自定义用户名
|
password: tr0ngP@ss # 强密码 (生产环境用环境变量注入)
|
roles: ACTUATOR_ADMIN
|
datasource:
|
druid:
|
# 基本配置
|
initial-size: 5
|
min-idle: 5
|
max-active: 20
|
|
# 连接测试配置
|
validation-query: SELECT 1
|
test-while-idle: true
|
test-on-borrow: false
|
test-on-return: false
|
|
# 时间配置(毫秒)
|
time-between-eviction-runs-millis: 60000
|
min-evictable-idle-time-millis: 300000
|
max-evictable-idle-time-millis: 3600000
|
|
# 连接超时配置
|
max-wait: 60000
|
connect-timeout: 30000
|
socket-timeout: 60000
|
|
# 其他配置
|
keep-alive: true
|
phy-max-use-count: 100000
|
remove-abandoned: true
|
remove-abandoned-timeout: 1800
|
log-abandoned: true
|
|
# 连接有效性检测
|
validation-query-timeout: 5
|
freemarker:
|
# 模板后缀名
|
suffix: .ftl
|
# 文档类型
|
content-type: text/html
|
# 页面编码
|
charset: UTF-8
|
# 页面缓存
|
cache: false
|
# 模板路径
|
template-loader-path: classpath:/templates/
|
web:
|
# 资源路径
|
resources:
|
static-locations: classpath:/static/
|
|
#swagger文档
|
swagger:
|
base-packages:
|
- org.springblade
|
- org.springframework.security.oauth2.provider.endpoint
|
|
#第三方登陆
|
social:
|
oauth:
|
GITHUB:
|
client-id: 233************
|
client-secret: 233************************************
|
redirect-uri: ${social.domain}/oauth/redirect/github
|
GITEE:
|
client-id: 233************
|
client-secret: 233************************************
|
redirect-uri: ${social.domain}/oauth/redirect/gitee
|
WECHAT_OPEN:
|
client-id: 233************
|
client-secret: 233************************************
|
redirect-uri: ${social.domain}/oauth/redirect/wechat
|
QQ:
|
client-id: 233************
|
client-secret: 233************************************
|
redirect-uri: ${social.domain}/oauth/redirect/qq
|
DINGTALK:
|
client-id: 233************
|
client-secret: 233************************************
|
redirect-uri: ${social.domain}/oauth/redirect/dingtalk
|
blade:
|
token:
|
single: true
|
state: true
|
##健康检查
|
management:
|
endpoints:
|
|
enabled-by-default: false
|
web:
|
exposure:
|
include: health,info # ★★ 只暴露必要端点!禁止包含 env/heapdump/jolokia ★★
|
endpoint:
|
health:
|
show-details: WHEN_AUTHORIZED # 健康详情仅授权可见
|