严重 [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [electric] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6c9a20a]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@59404c7b]) 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.
问题产生的原因是这样的,因为netty是异步关闭的,所以tomcat的servlet关闭了之后,netty其实还没有关闭,所以就爆出这个错误。只要把netty设置为同步关闭就可以了。但是现在同步关闭的时候还是会有一个警告:
不知该从哪里入手。。。