数据源基础配置datasource-config.properties

# 连接池初始化大小,最小,最大
default.initialSize=1
default.minIdle=1
[email protected]@
# 配置获取连接等待超时的时间
default.maxWait=60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
default.timeBetweenEvictionRunsMillis=3000
# 配置一个连接在池中最小生存的时间,单位是毫秒
default.minEvictableIdleTimeMillis=300000
#校验用sql语句
default.validationQuery=SELECT 'x'
#是否超时检测
default.testWhileIdle=true
#申请连接检测
default.testOnBorrow=false
#归还连接检测
default.testOnReturn=false
# 打开PSCache,并且指定每个连接上PSCache的大小
default.poolPreparedStatements=true
default.maxPoolPreparedStatementPerConnectionSize=20
# 配置监控统计拦截的filters
default.filters=stat

# 默认数据源
db.default = @db.default@
#数据源
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@

猜你喜欢

转载自blog.csdn.net/weixin_40197494/article/details/84852099
今日推荐