springboot 使用shrio进行权限控制
问题:使用shiro进行权限配置时在
public class ShiroConfig 中写了
// 配置不会被拦截的链接 顺序判断
filterChainDefinitionMap.put("/static/**", "anon");
springboot 目录结构中的resource文件夹下的static文件夹是需要的
js和css等文件,以为写了("/static/**", "anon");就可以匿访问static下的所有资源文件,结果浏览器报错
Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:8080/login".
且访问的资源url返回302,以为是路径没有写详细,改为/static/js/**,还是报错
解决办法:
应该直接写为/js/**的样式不要写static

浙公网安备 33010602011771号