Springboot shiro时静态资源 anon

版权声明: https://blog.csdn.net/yz18931904/article/details/82837086

springboot会将static中的静态资源做为classes文件夹下面的的内容在web服务器发布, 那如何放行静态资源, 同时可以拦截/**请求呢;我的操作不走是添加一个伪statics今天资源的路径; 

然后在shiro的config里面添加

filterChainDefinitionMap.put("/statics/**", "anon");
        filterChainDefinitionMap.put("/**", "authc");

现在就都可以访问了!!!!!!

猜你喜欢

转载自blog.csdn.net/yz18931904/article/details/82837086