Details
-
Question
-
Status: Closed
-
Major
-
Resolution: Invalid
-
1.2.1
-
None
-
None
-
apache-tomcat-7.0.57
Description
When I put the project into the .war package and deplyoed to tomcat,i cannot get the user by SecurityUtils.getSubject().getPrincipal().that don't have any error.
there are my session config:
<!-- 会话DAO -->
<bean id="sessionDAO"
class="org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO">
<property name="activeSessionsCacheName" value="shiro-activeSessionCache" />
<property name="sessionIdGenerator" ref="sessionIDGenerator" />
</bean>
<!-- 会话验证调度器 -->
<bean id="sessionValidationScheduler"
class="com.cz073586.security.session.QuartzSessionValidationSchedulerEx">
<property name="sessionValidationInterval" value="1800000" />
<property name="sessionManager" ref="sessionManager" />
</bean>
<!-- session管理 -->
<bean id="sessionManager"
class="org.apache.shiro.web.session.mgt.DefaultWebSessionManager">
<!-- # 3,600,000 milliseconds = 1 hour -->
<property name="globalSessionTimeout" value="7200000" />
<property name="sessionIdCookieEnabled" value="true" />
<!-- <property name="sessionIdCookie" ref="sessionIdCookie" /> -->
<property name="sessionValidationSchedulerEnabled" value="true" />
<property name="sessionValidationScheduler" ref="sessionValidationScheduler" />
<property name="sessionDAO" ref="sessionDAO" />
</bean>