📝 fix: 修改excel和core配置

Šī revīzija ir iekļauta:
weihongyang 2022-08-18 10:34:23 +08:00
vecāks bf24b8a7e5
revīzija fcf35bd12b
2 mainīti faili ar 2 papildinājumiem un 0 dzēšanām

Parādīt failu

@ -41,6 +41,7 @@ public class CorsConfig implements WebMvcConfigurer {
.allowedMethods("GET", "POST", "DELETE", "PUT")
// 设置允许的header属性
.allowedHeaders("*")
.exposedHeaders("*")
// 跨域允许时间
.maxAge(3600);
}

Parādīt failu

@ -41,6 +41,7 @@ public class ExcelUtils {
Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), pojoClass, list);
response.setCharacterEncoding("UTF-8");
response.setHeader("content-Type", "application/vnd.ms-excel");
response.setHeader("Access-Control-Expose-Headers","Content-Disposition");
response.setHeader("Content-Disposition",
"attachment;filename=" + URLEncoder.encode(fileName, "UTF-8") + ".xls");
ServletOutputStream out = response.getOutputStream();