美文网首页
一步一步教你用shiro——3配置并自定义sessionMana

一步一步教你用shiro——3配置并自定义sessionMana

作者: 江江的大猪 | 来源:发表于2018-04-30 23:43 被阅读1019次
        <property name="sessionManager">
            <bean class="com.qunar.lfz.shiro.MySessionManager">
                <!--默认自动检查session过期,删除过期session-->
                <property name="globalSessionTimeout" value="1800000"/>
                <property name="sessionValidationInterval" value="1800000"/>
                <!--默认MemorySessionDao-->
                <property name="sessionDAO">
                    <!--默认使用javaUuidGenerator-->
                    <bean class="com.qunar.lfz.shiro.MyRedisSessionDao"/>
                </property>
                <property name="sessionIdCookie">
                    <bean class="org.apache.shiro.web.servlet.SimpleCookie">
                        <constructor-arg value="shiroCookie"/>
                    </bean>
                </property>
                <!--避免url中出现jsessionid-->
                <property name="sessionIdUrlRewritingEnabled" value="false"/>
                <!--默认使用ExecutorServiceSessionValidationScheduler,AbstractValidatingSessionManager:209-->
            </bean>
        </property>

相关文章

网友评论

      本文标题:一步一步教你用shiro——3配置并自定义sessionMana

      本文链接:https://www.haomeiwen.com/subject/qyntrftx.html