子线程无法访问父线程中通过ThreadLocal设置的变量
一、提出现象在子线程中,是无法访问父线程通过ThreadLocal设置的变量的。案例代码/*** author 沐雨橙风ιε* version 1.0*/
public class ThreadLocalExample {public static void main(String[] args) throws Exception {ThreadLocal<String> threadLocal …
2026/9/24 11:12:16