严重: The web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@4a05e593]) and a value of type [org.nutz.lang.util.SimpleContext] (value [{}]) 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.
2014-4-28 10:29:30 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
Mvcs.resetALL() 和 NutMvcContext.reqThreadLocal 这里有内存泄漏,而且逻辑好像也不对
这里每次Web请求调用,肯定会初始化reqThreadLocal一次,而在线程结束的时候,没有给reqThreadLocal设置null,导致ThreadLocal线程内存会出现问题。 再看下面程序(Mvcs.java):
然后每次线程ThreadLocal都会出现未设置NULL 典型的样子是每次Tomcat重启,都会报一堆下面的错误: