This commit is contained in:
wujj 2020-10-21 15:51:27 +08:00
parent 178b1c954a
commit 40c6f9bea2
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ public class WebConfig implements WebMvcConfigurer {
registry.addResourceHandler("/html/**").addResourceLocations("/html/","file:html/"); registry.addResourceHandler("/html/**").addResourceLocations("/html/","file:html/");
//三种映射方式 webapp下当前目录下jar内 //三种映射方式 webapp下当前目录下jar内
registry.addResourceHandler("/app/**").addResourceLocations("/app/","file:app/", "classpath:/app/"); registry.addResourceHandler("/app/**").addResourceLocations("/app/","file:app/", "classpath:/app/");
registry.addResourceHandler("/static/**","/**").addResourceLocations("/static/","file:static/","classpath:/static/","classpath:/META-INF/resources/"); registry.addResourceHandler("/static/**").addResourceLocations("/static/","file:static/","classpath:/static/","classpath:/META-INF/resources/");
registry.addResourceHandler("/api/**").addResourceLocations("/api/","file:api/", "classpath:/api/"); registry.addResourceHandler("/api/**").addResourceLocations("/api/","file:api/", "classpath:/api/");
if(new File(uploadFloderPath).isAbsolute()){ if(new File(uploadFloderPath).isAbsolute()){
//如果指定了绝对路径上传的文件都映射到uploadMapping下 //如果指定了绝对路径上传的文件都映射到uploadMapping下