Method 1: Add parameters to the method, but instead of adding general parameters, you can try using JDK1.5 feature variable length parameters; Method 2: Use ThreadLocal data structure to store thread input parameters; Method 3: Use cache, etc. ; I can think of so much for now, I don’t know if there is a more reasonable logical way to handle the business, I hope it can help you~
Method 1: Add parameters to the method, but instead of adding general parameters, you can try using JDK1.5 feature variable length parameters;
Method 2: Use ThreadLocal data structure to store thread input parameters;
Method 3: Use cache, etc. ;
I can think of so much for now, I don’t know if there is a more reasonable logical way to handle the business, I hope it can help you~
Personally, I think you can try caching, such as Redis.