Spring HttpServletRequest对象的获取
1、Controller方法上获取
@RequestMapping(value = "/aliyun/ccc/callComing", method = RequestMethod.POST) public String callComing(HttpServletRequest request) {
}
2、通过注解
@Autowired
HttpServletRequest request;
3、通过代码获取
((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest()
 
                    
                
 
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号