1
zj
2024-05-21 0e20a4ee1fb4f46598948e9a42c350e7486f73b4
src/main/java/com/nq/config/WebMvcConfig.java
@@ -34,13 +34,13 @@
        //SpringMVC下,攔截器的註冊需要排除對靜態資源的攔截(*.css,*.js)
        //SpringBoot已經做好了靜態資源的映射,因此我們無需任何操作
        registry.addInterceptor(new ApiAgentAuthorityInterceptor()).addPathPatterns("/agent/**")
                .excludePathPatterns("/index.html", "/", "/user/login")
                .excludePathPatterns("/index.html", "/", "/user/login","/user/upload.do")
        ;
        registry.addInterceptor(new ApiUserAuthorityInterceptor(redisTemplate)).addPathPatterns("/user/**")
                .excludePathPatterns("/index.html", "/", "/user/login")
                .excludePathPatterns("/index.html", "/", "/user/login","/user/upload.do")
        ;
        registry.addInterceptor(new ApiAdminAuthorityInterceptor()).addPathPatterns("/admin/**")
                .excludePathPatterns("/index.html", "/", "/user/login")
                .excludePathPatterns("/index.html", "/", "/user/login","/user/upload.do")
        ;
    }
}