mysql-springjdbc 連接數據庫,超過8小時沒有連接,斷開了與數據庫的連接怎么辦

mysqljavaspringjdbc

如題,autoreconnect=true這個參數貌似在mysql5以后就不好使了,所以有時候訪問接口的時候會出錯,preparedstatementcallback
the last packet successfully received from the server was 934,535,670 milliseconds ago. the last packet sent successfully to the server was 934,535,672 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
這個問題怎么解決

回復內容:

http://blog.csdn.net/rariki/article/details/41121745?utm_source=tuicool&utm_medium=referral

? 版權聲明
THE END
喜歡就支持一下吧
點贊10 分享