您只需覆盖该
initialValue()方法:
private static ThreadLocal<List<String>> myThreadLocal = new ThreadLocal<List<String>>() { @Override public List<String> initialValue() { return new ArrayList<String>(); } };
欢迎分享,转载请注明来源:内存溢出
您只需覆盖该
initialValue()方法:
private static ThreadLocal<List<String>> myThreadLocal = new ThreadLocal<List<String>>() { @Override public List<String> initialValue() { return new ArrayList<String>(); } };
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)