1. 程式人生 > >shiro報錯No SecurityManager accessible

shiro報錯No SecurityManager accessible

  在使用shiro的過程中報錯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.

  在查詢後觀察到在applicationContext-shiro.xml中已經配置了securityManager,

在確認在web.xml已經配置了shiroFitler的過濾器的情況下最終確認為strust2的filer應該放置在shiro的filter後面,這是web.xml的執行順序問題