我百度到了解决方案,是修改在my.ini中最下面加入下面两个参数:
wait_timeout=31536000 interactive_timeout=3153600
但是不是很能理解为什么,因为后台写有连接数据库的定时任务。求助大佬可以稍微说下原因嘛,万分感谢,萌新JAVA开发求助!!!
[Java] 纯文本查看 复制代码 --- The error occurred while applying a parameter map.
--- Check the getDeleIdAndReceiIDByMap-InlineParameterMap.
--- Check the statement (query failed).
--- Cause: com.mysql.cj.jdbc.exceptions.CommunicationsException: The last packet successfully received from the server was 35,469,933 milliseconds ago. The last packet sent successfully to the server was 35,469,933 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.ibatis.common.jdbc.exception.NestedSQLException: |