码迷,mamicode.com
首页 > 编程语言 > 详细

spring MVC中获取request和response:

时间:2018-02-24 14:51:52      阅读:126      评论:0      收藏:0      [点我收藏+]

标签:body   gpo   http   attribute   tco   color   c中   mvc   stat   

 

spring MVC中获取request和response:

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

 

spring MVC中获取request和response:

标签:body   gpo   http   attribute   tco   color   c中   mvc   stat   

原文地址:https://www.cnblogs.com/shihaiming/p/8465418.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!