Althars123 4 年之前
父节点
当前提交
d67611ba50

+ 1 - 1
zzjs-framework/src/main/java/com/miaxis/framework/config/ResourcesConfig.java

@@ -29,7 +29,7 @@ public class ResourcesConfig implements WebMvcConfigurer
     {
         /** 本地文件上传路径 */
         registry.addResourceHandler(Constants.RESOURCE_PREFIX + "/**").addResourceLocations("file:" + MiaxisConfig.getProfile() + "/");
-
+        registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
         /** swagger配置 */
         registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
         registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");

+ 2 - 1
zzjs-framework/src/main/java/com/miaxis/framework/config/SecurityConfig.java

@@ -110,7 +110,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
                         "/*.html",
                         "/**/*.html",
                         "/**/*.css",
-                        "/**/*.js"
+                        "/**/*.js",
+                        "/static/**"
                 ).permitAll()
                 .antMatchers("/profile/**").anonymous()
                 .antMatchers("/common/download**").anonymous()