스프링 HttpServletRequest, HttpServletResponse는 RequestContextHolder를 통해 가져오기

 

ServletRequestAttributes servletContainer = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();

HttpServletResponse response = servletContainer.getResponse();
HttpServletRequest request = servletContainer.getRequest();

 

BELATED ARTICLES

more