参考:
https://www.codenong.com/cs109852668/
https://www.cnblogs.com/east7/p/14900555.html
修改配置:
#最大生命周期,0不过期
max-lifetime: 0
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://xxx
username: ${username}
password: ${password}
hikari:
auto-commit: true
#空闲连接超时时长
idle-timeout: 60000
#连接超时时长
connection-timeout: 60000
#最大生命周期,0不过期
max-lifetime: 0
#最小空闲连接数
minimum-idle: 10
#最大连接数量
maximum-pool-size: 10