Explorar el Código

开启权限验证

yaobo hace 7 años
padre
commit
810ef5d9c1
Se han modificado 1 ficheros con 9 adiciones y 9 borrados
  1. 9 9
      src/main/java/cn/efunbox/audio/config/Config.java

+ 9 - 9
src/main/java/cn/efunbox/audio/config/Config.java

@@ -52,19 +52,19 @@ public class Config extends WebMvcConfigurerAdapter{
 
     @Override
     public void addInterceptors(InterceptorRegistry registry) {
-//        registry.addInterceptor(authInterceptor())
-//                .addPathPatterns("/audio/search")
-//                .excludePathPatterns("/device/**");
+        registry.addInterceptor(authInterceptor())
+                .addPathPatterns("/audio/search")
+                .excludePathPatterns("/device/**");
 
-//        registry.addInterceptor(adminInterceptor())
-//                .addPathPatterns("/**")
-//                .excludePathPatterns("/device/**", "/admin/login", "/audio/search");
-
-        registry.addInterceptor(allowOriginIntercepter())
-                .addPathPatterns("/**");
+        registry.addInterceptor(adminInterceptor())
+                .addPathPatterns("/**")
+                .excludePathPatterns("/device/**", "/admin/login", "/audio/search");
 
         registry.addInterceptor(ignoreOptionsInterceptor())
                 .addPathPatterns("/**");
+
+//        registry.addInterceptor(allowOriginIntercepter())
+//                .addPathPatterns("/**");
     }
 //
 //    /**