Springboot使用内置对象HttpServletRequest、HttpServletResponse
// 获取HttpServletRequest内置对象
HttpServletRequest httpServletRequest = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
.getRequest();
// 获取HttpServletResponse内置对象
HttpServletResponse httpServletResponse = ((ServletRequestAttributes) RequestContextHolder
.getRequestAttributes()).getResponse();