主要错误如下:
org.apache.shiro.authz.UnauthenticatedException: This subject is anonymous - it does not have any identifying principals and authorization operations require an identity to check against. A Subject instance will acquire these identifying principals automatically after a successful login is performed be executing org.apache.shiro.subject.Subject.login(AuthenticationToken) or when 'Remember Me' functionality is enabled by the SecurityManager. This exception can also occur when a previously logged-in Subject has logged out which makes it anonymous again. Because an identity is currently not known due to any of these conditions, authorization is denied.
原因是在虽然已经将接口开放,但是方法上却设置了权限
如这里已经开放了接口:
但方法上却设置了权限验证
就好比打开了防盗门,卧室门却锁着
解决方法,要么别开放,要么全开放