Shiro 不走鉴权方法并且,There is no session with id
background:spring4 , mvc ,shiro1.3
probelm:发现不走鉴权方法,并且there is no session with id,
解决步骤
-**输入session和cookie信息
request.getHeader(“Cookie”);
session.getId();
发现
然而继续看日志,发现
问题算是比较清楚了,在
http://blog.csdn.net/caimengyuan/article/details/52526765
的帮助下,按照其配置
<bean id="sessionManager" class="org.apache.shiro.web.session.mgt.DefaultWebSessionManager">
<property name="globalSessionTimeout" value="1800000"/>
<property name="deleteInvalidSessions" value="true"/>
<property name="sessionValidationSchedulerEnabled" value="true"/>
<property name="sessionValidationScheduler" ref="sessionValidationScheduler"/>
<property name="sessionDAO" ref="sessionDAO"/>
<property name="sessionIdCookieEnabled" value="true"/>
<property name="sessionIdCookie" ref="sessionIdCookie"/>
</bean>
<bean id="sessionIdCookie" class="org.apache.shiro.web.servlet.SimpleCookie">
<constructor-arg name="name" value="meta.session.id"/>
</bean>
重新启动项目,