spring MVC中获取request和response:

 

spring MVC中获取request和response:

HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();  
HttpServletResponse response = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getResponse(); 

 

posted @ 2018-02-24 13:43  这个名字想了很久~  阅读(277)  评论(0编辑  收藏  举报