34 lines
1.3 KiB
YAML
34 lines
1.3 KiB
YAML
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
|
||
|