程序页面查看报错异常,具体如下:
Cause: com.mysql.cj.jdbc.exceptions.CommunicationsException: The last packet successfully received from the server was 426,962,099 milliseconds ago. The last packet sent successfully to the server was 426,962,100 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.;
————————————————
在文件最后添加autoReconnect=true,多个参数之间使用&连接。
jdbc.url = jdbc:mysql://{yourIpAddress}:3306/o2o?useUnicode=true&autoReconnect=true
具体如下:
"url": "jdbc:mysql://mysql5.t.demo.com:3306/gateway?useSSL=false&useUnicode=true&characterEncoding=utf-8&autoReconnect=true"