shiro纠结之旅

最近项目用到shiro,很多东西不是很明白,暂且记录一下遇到的问题及解决办法

this subject is anonymous - it does not have any identifying principals and anthorization operation require an identity to check……(两台电脑不能复制粘贴,写这串也是够了= =||)这个报错的原因,是shiro的filterchaindefinitions中定义了某个路由anon(也就是anonymous缩写)这个路由被认为全开放,但是调用的rest接口对应的方法前面却加上了@requirepremissions标签来要求得到某个权限。也就是好比大门开着,小门却关着,shiro无法理解这种意图。解决办法当然就是打开小门或者关闭大门咯

原文地址:https://www.cnblogs.com/javaxiu/p/4460345.html