org.apache.shiro.UnavailableSecurityManagerException: No SecurityManager accessible to the calling code


異常提示

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.
at org.apache.shiro.SecurityUtils.getSecurityManager(SecurityUtils.java:123)
at org.apache.shiro.subject.Subject$Builder.(Subject.java:627)
at org.apache.shiro.SecurityUtils.getSubject(SecurityUtils.java:56)

 

異常原因

SecurityManager 
算了 不寫了

 

解決方案

把shiro的filter放到所有filter的最前面 web.xml、也可以這么說,放到Spring框架的filter前面即可

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM