Home > Back-end > Tomcat static property sharing multiple requests
Tomcat static property sharing multiple requests
Time:11-12
A static property of a class, for example, the request for the first time to value, the second request this value is still there, this is related to Tomcat's request is thread? If I want to every request is independent of each other, how to implement (static attributes have global role, can't replace with instance attributes)?
CodePudding user response:
Threadlocal should be able to meet the needs of the lz