文件上传路径

master
RuoYi 6 years ago committed by Limy
parent 62bfcf1ae8
commit bf620bf63d

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

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

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

Loading…
Cancel
Save