shiro报错:No SecurityManager accessible to the calling code

来源:互联网 发布:spring源码博客 编辑:程序博客网 时间:2024/06/06 19:22

报错信息:

org.apache.shiro.UnavailableSecurityManagerException: No SecurityManager accessible to the calling code,either bound to the org.apache.shiro.util.ThreadContext or as a vm static singleton.  This is an invalid application configuration.

错误原因:

Web.xml配置文件里面的shiro过滤器放在了struts2过滤器的后面。

改正方法:

必须先写shiro过滤器再配置struts2过滤器,因为是先走shiro再走struts2。


阅读全文
0 0