diff --git a/win-framework/win-spring-boot-starter-excel/src/main/java/com/win/framework/excel/core/util/ExcelUtils.java b/win-framework/win-spring-boot-starter-excel/src/main/java/com/win/framework/excel/core/util/ExcelUtils.java index 0636d3d2..5ff31c4a 100644 --- a/win-framework/win-spring-boot-starter-excel/src/main/java/com/win/framework/excel/core/util/ExcelUtils.java +++ b/win-framework/win-spring-boot-starter-excel/src/main/java/com/win/framework/excel/core/util/ExcelUtils.java @@ -102,7 +102,7 @@ public class ExcelUtils { */ public static String writeLocalFile(String fileName, String sheetName, List dataList) throws FileNotFoundException { WebProperties webProperties = SpringUtil.getBean(WebProperties.class); - fileName = fileName + LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8")) + ".xlsx"; + fileName = fileName + LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8")); File file = ResourceUtils.getFile( webProperties.getProfile() + "/" + fileName); EasyExcel.write(file).sheet(sheetName).doWrite(dataList); return Constant.RESOURCE_PREFIX + fileName; diff --git a/win-framework/win-spring-boot-starter-web/src/main/java/com/win/framework/web/constant/Constant.java b/win-framework/win-spring-boot-starter-web/src/main/java/com/win/framework/web/constant/Constant.java index 6df8ab34..7d2d0390 100644 --- a/win-framework/win-spring-boot-starter-web/src/main/java/com/win/framework/web/constant/Constant.java +++ b/win-framework/win-spring-boot-starter-web/src/main/java/com/win/framework/web/constant/Constant.java @@ -5,6 +5,6 @@ public class Constant { /** * 资源映射路径 前缀 */ - public static final String RESOURCE_PREFIX = "/profile"; + public static final String RESOURCE_PREFIX = "/profile/"; }