ThreadLocal内存泄漏问题最近在复盘重新黑马还有尚硅谷一些项目,发现我们在使用获取当前用户id这项功能的时候主要是使用ThreadLocal来进行存取定义: public class BaseContext { public static ThreadLocal<Long> threadLocal = new ThreadLocal<>(); public static void setCurrentId(Long id) { threadLocal.set(id); } public static Long getCurrentId() { return th...