📝 fix: 修改excel和core配置
Šī revīzija ir iekļauta:
vecāks
bf24b8a7e5
revīzija
fcf35bd12b
@ -41,6 +41,7 @@ public class CorsConfig implements WebMvcConfigurer {
|
||||
.allowedMethods("GET", "POST", "DELETE", "PUT")
|
||||
// 设置允许的header属性
|
||||
.allowedHeaders("*")
|
||||
.exposedHeaders("*")
|
||||
// 跨域允许时间
|
||||
.maxAge(3600);
|
||||
}
|
||||
|
@ -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();
|
||||
|
Notiek ielāde…
Atsaukties uz šo jaunā problēmā
Block a user