java - 页面过来的请求包含参数a,该参数没传递到dao,如何在dao获取参数a
阿神
阿神 2017-04-18 09:42:07
0
2
581

ps1 不同用户的不同请求中参数a都是不一样的
ps2 不能给方法加参数,因为太复杂,如果加参数至少要加上百个方法,而且容易遗漏。
java项目
先谢过了,提供思路和方向也好

阿神
阿神

闭关修行中......

reply all(2)
小葫芦

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!