springMVC获得HttpServletRequest对象
在springMVC的controller中获得HttpServletRequest对象
@RequestMapping("/test")
@ResponseStatus(HttpStatus.NO_CONTENT)
public void test(HttpServletRequest request){
System.out.println(request.getServletPath());
}
在springMVC的controller中获得HttpServletRequest对象
@RequestMapping("/test")
@ResponseStatus(HttpStatus.NO_CONTENT)
public void test(HttpServletRequest request){
System.out.println(request.getServletPath());
}