From bf620bf63de941e30d1fb68844ea919faf00ce25 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 18 Sep 2018 18:51:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0=E8=B7=AF?= =?UTF-8?q?=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/ruoyi/framework/config/ResourcesConfig.java | 2 +- src/main/java/com/ruoyi/framework/config/RuoYiConfig.java | 4 ++-- src/main/resources/application.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java b/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java index ecade3a3..9ad35eb3 100644 --- a/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java +++ b/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java @@ -33,7 +33,7 @@ public class ResourcesConfig implements WebMvcConfigurer public void addResourceHandlers(ResourceHandlerRegistry registry) { /** 头像上传路径 */ - registry.addResourceHandler("/profile/**").addResourceLocations("file:" + RuoYiConfig.getProfile() + "/"); + registry.addResourceHandler("/profile/**").addResourceLocations("file:" + RuoYiConfig.getProfile()); /** swagger配置 */ registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/"); diff --git a/src/main/java/com/ruoyi/framework/config/RuoYiConfig.java b/src/main/java/com/ruoyi/framework/config/RuoYiConfig.java index 0f8ee477..a890ff99 100644 --- a/src/main/java/com/ruoyi/framework/config/RuoYiConfig.java +++ b/src/main/java/com/ruoyi/framework/config/RuoYiConfig.java @@ -75,12 +75,12 @@ public class RuoYiConfig public static String getAvatarPath() { - return profile + "/avatar/"; + return profile + "avatar/"; } public static String getDownloadPath() { - return profile + "/download/"; + return profile + "download/"; } } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index cdaf7ecc..c2c2535a 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -7,7 +7,7 @@ ruoyi: # 版权年份 copyrightYear: 2018 # 文件上传路径 - profile: D:/profile + profile: D:/profile/ # 获取ip地址开关 addressEnabled: false