最近在使用spring-jdbc数据库连接管理时,出现一个奇怪问题,当天部署运行没问题,第二天再试就报以下异常问题
org.springframework.dao.RecoverableDataAccessException: PreparedStatementCallback; SQL []; The last packet successfully received from the server was 56,799,849 milliseconds ago. The last packet sent successfully to the server was 56,799,850 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.; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 56,799,849 milliseconds ago. The last packet sent successfully to the server was 56,799,850 milliseconds ago. is longer than the server configured