解决shiro登录后,isAuthenticated还是false问题

shiro通过默认的登录拦截器FormAuthenticationFilter登录后,在java中调用SecurityUtils.getSubject().isAuthenticated()或在jsp页面中使用shiro:authenticated标签,结果还是为false。最终查明原因,在spring配置sessionManager时,使用了org.apache.shiro.session.mgt.DefaultSessionManager,将它改为org.apache.shiro.web.session.mgt.DefaultWebSessionManager就可以了。

你可能感兴趣的:(spring,shiro,sessionManager)