问题:
A web application appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
解决:
-
升级mysql-connector-java版本。
-
引入:
@Component
public class ShutdownListener implements ServletContextListener {
@Override
public void contextInitialized(ServletContextEvent sce) {
}
@Override
public void contextDestroyed(ServletContextEvent sce) {
AbandonedConnectionCleanupThread.checkedShutdown();
}
}
参考:https://bugs.mysql.com/bug.php?id=69526