public class Variable {
Public static ThreadLocalThe username=new ThreadLocal (a);
The static {
Variable. The username. Set (" aaa ");
}
}
Code to run on tomcat, when after the get request to get right the first time, get a second request to the is null, what reason is this excuse me?
My demand is each request the static property has an independent life cycle, which is the attribute in this request is global Shared, after the request is released, how to implement?