Commit 40c6f9be authored by wujj's avatar wujj

配置

parent 178b1c95
...@@ -76,7 +76,7 @@ public class WebConfig implements WebMvcConfigurer { ...@@ -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下
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment