当从 Tomcat 取消部署 *.war 文件时(例如通过 tomcat Web 前端),会检测到以下内存泄漏:
02-Jul-2019 11:50:40.143 WARNING [http-nio-8080-exec-5] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [my-app] appears to have started a thread named [Thread-22] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.base@11.0.3/java.lang.Thread.sleep(Native Method)
org.springframework.boot.actuate.context.ShutdownEndpoint.performShutdown(ShutdownEndpoint.java:67)
org.springframework.boot.actuate.context.ShutdownEndpoint$$Lambda$3977/0x000000084242f040.run(Unknown Source)
java.base@11.0.3/java.lang.Thread.run(Thread.java:834)
你能解决这个问题吗?