我有一个web应用war
是建立与spring-boot-starter-web
和运行在tomcat8
。web.xml会话超时没有考虑到春季启动web应用程序?
只有一个应用程序,我想增加会话超时。因此增加了以下文件:
/src/main/resources/WEB-INF/web.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<web-app 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"
version="3.1">
<session-config>
<session-timeout>600</session-timeout>
</session-config>
</web-app>
但TTL会话超时仍然是默认的30分钟。为什么?
你需要一个限制吗?为什么不把它彻底关掉?将其设置为0。 –
这只是一个例子。但我需要一个确定的限制。 – membersound