HttpServletResponse实例化
HttpServletResponse实例化的另一种方法
HttpServletRequest方法相同
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletResponse response = servletRequestAttributes.getResponse();
posted on 2018-11-16 10:43 HuaChenYing 阅读(5908) 评论(0) 编辑 收藏 举报