解决方案

数据库连接设置:autoReconnect = true

url=jdbc:mysql://xxx.xxx.xxx.xxx:3306/xxx?characterEncoding=UTF-8&allowMultiQueries=true&autoReconnect=true&pinGlobalTxToPhysicalConnection=true

配置设置:

spring.datasource.druid.testOnBorrow=true

spring.jta.atomikos.datasource.test-query=SELECT 1

spring.jta.atomikos.datasource.borrow-connection-timeout=60

 

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐