异常
Caused by: com mysel. jdbc. exceptions. idbc4. CommmicationsException: The last packet successfully received from the server was 139,360 milliseconds ago.
nsider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/connection propertyautoeconnecttrue’ to aoid this problem
经过查阅, 个人理解为这次请求所用的时间139,360毫秒, 超过了数据库所设置wait_timeout的值
设置全局的wait_timeout值
SET GLOBAL wait_timeout=28800;
问题解决