在配置文件ticketExpirationPolicies.xml中配置:
<bean id="grantingTicketExpirationPolicy" class="org.jasig.cas.ticket.support.TicketGrantingTicketExpirationPolicy"
p:maxTimeToLiveInSeconds="${tgt.maxTimeToLiveInSeconds:28800}" <!-- 生成开始计算的存在时间 ,超时则无效,需重登陆,单位秒 -->
p:timeToKillInSeconds="${tgt.timeToKillInSeconds:300}"/> <!-- 鼠标静止计算的存在时间 ,超时则无效,需重登陆,单位秒 -->
注意:【1】上述时间;
【2】cas项目的web.xml里的session-timeout时间(单位分钟);
【3】web应用里的web.xml的session-timeout时间,谁最大,按谁生效。
<!-- <bean id="grantingTicketExpirationPolicy" class="org.jasig.cas.ticket.support.NeverExpiresExpirationPolicy"></bean>-->
<!-- <bean id="grantingTicketExpirationPolicy" class="org.jasig.cas.ticket.support.TimeoutExpirationPolicy">
<constructor-arg index="0" value="15000" />
</bean> --> <!-- 单位是毫秒 -->
<!-- <bean id="grantingTicketExpirationPolicy" class="org.jasig.cas.ticket.support.HardTimeoutExpirationPolicy">
<constructor-arg index="0" value="5000" />
</bean> --> <!-- 单位是毫秒 -->
<!--
<bean id="grantingTicketExpirationPolicy" class="org.jasig.cas.ticket.support.RememberMeDelegatingExpirationPolicy">
<property name="sessionExpirationPolicy">
<bean class="org.jasig.cas.ticket.support.TimeoutExpirationPolicy">
<constructor-arg index="0" value="5000"></constructor-arg>
</bean>
</property>
<property name="rememberMeExpirationPolicy">
<bean class="org.jasig.cas.ticket.support.TimeoutExpirationPolicy">
<constructor-arg index="0" value="5000"></constructor-arg>
</bean>
</property>
</bean>
-->