PC-202403201522\Administrator
2024-05-13 865eeb5d1b4d883ba9a70b64e4f8e3e4d271ce4d
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")
        ;
    }
}