配置_StatFilter
Druid内置提供一个StatFilter,用于统计监控信息。
druid:
initialSize: 3
minIdle: 0
maxActive: 20
maxWait: 60000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: select 1 from dual
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: false
maxPoolPreparedStatementPerConnectionSize: 20
phyTimeoutMillis: 1200000
#filters: stat,slf4j
filters: stat
#connectionProperties: druid.stat.logSlowSql=true;druid.stat.slowSqlMillis=5000
druid的配置文档链接:
https://github.com/alibaba/druid/wiki/%E9%85%8D%E7%BD%AE_StatFilter
druid的常见问题: