File file = new File(xxx);
response.setCharacterEncoding("utf-8");
response.addHeader("Content-Disposition", "attachment; filename*=UTF-8''" + URLEncoder.encode(fileName, "UTF-8") + ".xlsx");
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition");
response.setContentType("application/vnd.ms-excel;charset=utf-8);
response.getOutputStream().write(FileUtils.readFileToByteArray(file));
标签:UTF,SpringBoot,excel,Disposition,Content,file,response,下载
From: https://www.cnblogs.com/lambertlt/p/16616180.html