|
|
|
@ -121,14 +121,14 @@ spring:
|
|
|
|
|
# 初始化大小,最小,最大
|
|
|
|
|
initial-size: 5
|
|
|
|
|
min-idle: 5
|
|
|
|
|
maxActive: 20
|
|
|
|
|
maxActive: 1000
|
|
|
|
|
# 配置获取连接等待超时的时间
|
|
|
|
|
maxWait: 60000
|
|
|
|
|
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
|
|
|
|
timeBetweenEvictionRunsMillis: 60000
|
|
|
|
|
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
|
|
|
|
minEvictableIdleTimeMillis: 300000
|
|
|
|
|
validationQuery: SELECT 1
|
|
|
|
|
validationQuery: SELECT 1 FROM DUAL
|
|
|
|
|
testWhileIdle: true
|
|
|
|
|
testOnBorrow: false
|
|
|
|
|
testOnReturn: false
|
|
|
|
@ -155,8 +155,7 @@ spring:
|
|
|
|
|
#redis 配置
|
|
|
|
|
redis:
|
|
|
|
|
database: 0
|
|
|
|
|
host: 172.18.0.3
|
|
|
|
|
#host: 127.0.0.1
|
|
|
|
|
host: 127.0.0.1
|
|
|
|
|
lettuce:
|
|
|
|
|
pool:
|
|
|
|
|
max-active: 8 #最大连接数据库连接数,设 -1 为没有限制
|
|
|
|
|