Spring 手动获取request和response

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

 

posted @ 2018-02-27 14:49  七脉  阅读(246)  评论(0编辑  收藏  举报