优化生产环境多数据源报错

This commit is contained in:
geht
2026-06-16 18:41:35 +08:00
parent 97a1543e97
commit e28352f8ea
4 changed files with 26 additions and 2 deletions

View File

@@ -128,7 +128,8 @@ spring:
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
validationQuery: SELECT 1 FROM DUAL
# SQL Server 中间库不支持 DUAL使用通用校验语句MySQL/SQL Server 均兼容)
validationQuery: SELECT 1
testWhileIdle: true
testOnBorrow: false
testOnReturn: false