会话在web.xml中定义的会话超时之前注销

时间:2018-10-08 10:27:11

标签: java spring session-timeout

我的Java Web应用程序中遇到一个奇怪的问题,可能是我丢失了一些东西。我正在使用Spring MVC 4,Hibernate,Java 8(但未使用Spring Security)。

web.xml中,我使用以下设置会话超时:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>
....
<session-config>
    <session-timeout>
        30
    </session-timeout>
</session-config>

我已使用负载均衡器(其中有两个VM)部署了该应用程序。但是应用程序仅在2分钟后注销,而注销时间是30分钟?

我经历了6 steps to investigate unexpected logouts in your Java web application,并遵循前三种方法,但没有成功。有人可以给我任何建议吗?

0 个答案:

没有答案
相关问题