@@ -29,7 +29,7 @@ public class WebMvcConfig extends WebMvcConfigurationSupport { | |||
.addResourceLocations("classpath:/META-INF/resources/"); | |||
registry.addResourceHandler("/webjars/**") | |||
.addResourceLocations("classpath:/META-INF/resources/webjars/"); | |||
registry.addResourceHandler(staticAccessPath).addResourceLocations("file:///"+uploadFolder); | |||
registry.addResourceHandler(staticAccessPath).addResourceLocations("file:"+uploadFolder); | |||
super.addResourceHandlers(registry); | |||
} | |||
} |
@@ -59,7 +59,7 @@ file: | |||
#上传的服务器上的映射文件夹 | |||
accessPath: /upload/ | |||
#静态资源对外暴露的访问路径 | |||
staticAccessPath: /upload/** | |||
staticAccessPath: /** | |||
###静态资源实际存储路径 | |||
uploadFolder: /data/java/lishui/public/upload/ | |||
uploadImage: temp/ |