在我停止專案的時候,發現了如下警告
01-Sep-2020 11:28:47.778 嚴重 [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [xxx] created a ThreadLocal with key of type [org.springframework.core.NamedThreadLocal] (value [Current AOP method invocation]) and a value of type [org.springframework.aop.framework.CglibAopProxy.CglibMethodInvocation] (value [ReflectiveMethodInvocation: xxx(int,int); target is of class [xxxImpl]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
初步分析是引入的AOP導致的,但是不知道具體的原因以及怎么解決
希望大神們指點
uj5u.com熱心網友回復:
我覺得這個不算是問題,你都停止行程了,為何要管這種例外?這個提醒的場景跟你現在的場景不是一回事uj5u.com熱心網友回復:
檢查下用到ThreadLocal 的地方轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/14386.html
標籤:Web 開發
