shiro 开放接口后 调用报错: This subject is anonymous

主要错误如下:

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.

原因是在虽然已经将接口开放,但是方法上却设置了权限
如这里已经开放了接口:
在这里插入图片描述

但方法上却设置了权限验证
在这里插入图片描述
就好比打开了防盗门,卧室门却锁着
解决方法,要么别开放,要么全开放

相关推荐

  1. Python调用pyspark整理

    2024-04-08 18:18:09       62 阅读
  2. springcloud微服务调用

    2024-04-08 18:18:09       34 阅读
  3. 调用plt函数not ‘KeyboardModifier’

    2024-04-08 18:18:09       28 阅读
  4. React 开发整理

    2024-04-08 18:18:09       35 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-08 18:18:09       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-08 18:18:09       106 阅读
  3. 在Django里面运行非项目文件

    2024-04-08 18:18:09       87 阅读
  4. Python语言-面向对象

    2024-04-08 18:18:09       96 阅读

热门阅读

  1. MQ5之CCI交叉信号

    2024-04-08 18:18:09       32 阅读
  2. P8605 [蓝桥杯 2013 国 AC] 网络寻路

    2024-04-08 18:18:09       28 阅读
  3. UDP协议

    UDP协议

    2024-04-08 18:18:09      31 阅读
  4. 跨域问题及解决方案

    2024-04-08 18:18:09       36 阅读
  5. 【软件架构学习】一、基本概念

    2024-04-08 18:18:09       33 阅读
  6. 《空对象模式(极简c++)》

    2024-04-08 18:18:09       34 阅读
  7. QString()和QString(““)的区别

    2024-04-08 18:18:09       33 阅读