#数据源基本信息
spring:
datasource:
druid:
username: root
password: 123456
url: jdbc:mysql://localhost:3306/daily?useSSl=ture&serverTimezone=UTC&useUnicode=true&characterEncoding=UTF-8
driver-class-name: com.mysql.cj.jdbc.Driver
#连接池属性
initial-size: 15
max-active: 100
min-idle: 15
max-wait: 60000
time-between-eviction-runs-millis: 60000
min-evictable-idle-time-millis: 300000
test-on-borrow: false
test-on-return: false
test-while-idle: true
validation-query: SELECT 1
validation-query-timeout: 1000
keep-alive: true
remove-abandoned: true
remove-abandoned-timeout: 180
log-abandoned: true
pool-prepared-statements: true
max-pool-prepared-statement-per-connection-size: 20
filters: stat,wall,slf4j
use-global-data-source-stat: true
maxOpenPreparedStatements: 100
connect-properties.mergeSql: true
connect-properties.slowSqlMillis: 5000
# 配置DruidStatFilter
web-stat-filter:
enabled: true
url-pattern: "/*"
exclusions: "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*"
# 配置DruidStatViewServlet
stat-view-servlet:
url-pattern: "/druid/*"
# IP白名单(没有配置或者为空,则允许所有访问)
allow: 127.0.0.1
# IP黑名单 (存在共同时,deny优先于allow)
deny: 192.168.0.1
# 禁用HTML页面上的“Reset All”功能
reset-enable: false
# 登录名
login-username: admin
# 登录密码
login-password: 123456
# 新版需要配置这个属性才能访问监控页面
enabled: true