Spring中获取request的几种方法,及其线程安全性分析 谁借莪1个温暖的怀抱¢ 2023-02-19 04:26 1阅读 0赞 public class ScsBIZBaseController { protected HttpServletRequest request; protected Map<String, Object> data; @SuppressWarnings("unchecked") @ModelAttribute public void init(HttpServletRequest request) throws UnsupportedEncodingException { this.request = request; String paramData= request.getParameter("param111"); this.data = paramData; } //... 下面省略 ** 看到了同事的这个写法,我觉得是不安全的,就去百度查了查,果然找到了。** [https://www.jianshu.com/p/b79b144d4b95][https_www.jianshu.com_p_b79b144d4b95] **你觉得这种写法安全吗? 说出你的看法。 谢谢各位大佬** [https_www.jianshu.com_p_b79b144d4b95]: https://www.jianshu.com/p/b79b144d4b95
还没有评论,来说两句吧...