kdayun-template/modules/kdayun-app/src/main/resources/application-druid.yml

34 lines
1.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

spring:
datasource:
druid:
initialSize: 20
minIdle: 20
maxActive: 2000
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,机构是毫秒
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,机构是毫秒
minEvictableIdleTimeMillis: 300000
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
# 打开PSCache并且指定每个连接上PSCache的大小
poolPreparedStatements: true
maxPoolPreparedStatementPerConnectionSize: 30
# 配置监控统计拦截的filters去掉后监控界面sql无法统计wall用于防火墙
# filters: stat
# 通过connectProperties属性来打开mergeSql功能慢SQL记录
# connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=3000
#使用非公平锁
useUnfairLock: true
removeAbandoned: true
removeAbandonedTimeoutMillis: 300000
logAbandoned: true
keepAlive: true
filter:
commons-log:
#data-source-log-enabled: true
statement-log-enabled: true
statement-executable-sql-log-enable: true