首頁  >  文章  >  資料庫  >  mysql-springjdbc 連接資料庫,超過8小時沒有連接,斷開了與資料庫的連接怎麼辦

mysql-springjdbc 連接資料庫,超過8小時沒有連接,斷開了與資料庫的連接怎麼辦

WBOY
WBOY原創
2016-09-28 08:38:13937瀏覽

mysqljavaspringjdbc

如題,autoReconnect=true這個參數似乎在mysql5以後就不好使了,所以有時候訪問接口的時候會出錯,PreparedStatementCallback
The last packet successfully received the 4,375, packet, 4,385,p ent 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 sider either expiring and/or testing connection validity before) in yue. 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

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn