java获取request和response:
1
2
3
|
HttpServletResponse response = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getResponse(); //获取response
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); //获取request
|
本文转自建波李 51CTO博客,原文链接:http://blog.51cto.com/jianboli/2047672,如需转载请自行联系原作者