文件上传路径

pull/26/head
RuoYi 2018-09-18 18:51:13 +08:00
parent b6048e5429
commit 9d581bec25
3 changed files with 4 additions and 4 deletions

View File

@ -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/");

View File

@ -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/";
}
}

View File

@ -7,7 +7,7 @@ ruoyi:
# 版权年份
copyrightYear: 2018
# 文件上传路径
profile: D:/profile
profile: D:/profile/
# 获取ip地址开关
addressEnabled: false