https://blog.csdn.net/ljq54/article/details/89951137 springboot多文件打包下载到客户端--工具类utils
// 获得request对象,response对象
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest request = attributes.getRequest();
HttpServletResponse response = attributes.getResponse();