开发者社区 问答 正文

shiro遇到404就跳到登录界面请问大家谁遇到过这种问题

shiro遇到404就跳到登录界面请问大家谁遇到过这种问题

展开
收起
a123456678 2016-03-17 10:09:24 3645 分享 版权
1 条回答
写回答
取消 提交回答
  • <!-- Session Manager -->
        <bean id="sessionManager" class="org.apache.shiro.web.session.mgt.DefaultWebSessionManager">
            <property name="sessionIdCookieEnabled" value="true"/>
            <property name="sessionIdCookie" ref="sessionIdCookie"/>
            <property name="deleteInvalidSessions" value="true"/>
            <property name="sessionDAO" ref="sessionDAO" />
            <property name="sessionValidationSchedulerEnabled" value="true"/>
            <property name="globalSessionTimeout" value="10000"/>
            <property name="sessionValidationInterval" value="10000"/><!--Session 超时检测时间 单位:毫秒-->
            <property name="sessionListeners">
                <list>
                    <ref bean="simpleShiroSessionListener"/>
                </list>
            </property>
        </bean>
     
        <bean id="sessionIdCookie" class="org.apache.shiro.web.servlet.SimpleCookie">
            <constructor-arg value="sid"/>
            <property name="httpOnly" value="true"/>
            <property name="maxAge" value="180000"/>
        </bean>
    2019-07-17 19:04:36
    赞同 展开评论
问答地址: