优化数据库连接配置

This commit is contained in:
2025-08-27 01:57:13 +08:00
parent 72ccd0cff6
commit 84d578fb59

View File

@ -29,7 +29,12 @@ spring:
password: Sczx123@
driver-class-name: com.mysql.cj.jdbc.Driver
hikari:
maximum-pool-size: 10
maximum-pool-size: 20 # 最大连接数
minimum-idle: 5 # 最小空闲连接数
connection-timeout: 30000 # 连接超时时间(毫秒)
idle-timeout: 600000 # 空闲连接超时时间(毫秒)
max-lifetime: 1800000 # 连接最大存活时间(毫秒)
leak-detection-threshold: 60000 # 连接泄漏检测阈值(毫秒)
auto-commit: true
redis:
host: 115.190.8.52