优化数据库连接

This commit is contained in:
2025-08-27 01:51:09 +08:00
parent 03fa3ef558
commit f80c13a93f

View File

@ -14,7 +14,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