1

My app uses Spring Boot and I want the user sessions timeout to be 12h. I put the server.session.timeout=43200 in my application.properties but the session is still expiring long before the 12 hours.

The app runs in a Tomcat 7 instance behind an Apache server. Do I need to do any extra configuration in the container or server?

1 Answers1

2

Those properties (server.*) only work if SpringBoot is controlling Tomcat (i.e. SpringBoot with an embedded Tomcat deployed as an executable JAR), rather than when deploying it as a WAR into an existing Tomcat instance.

So you'll need to configure the session timeout in one of the 'old' ways: e.g.

Through Tomcat: Default session timeout for Apache Tomcat applications

Through Spring Security: Setting session timeout period with Spring Security 3.0

Community
  • 1
  • 1
David Lavender
  • 8,021
  • 3
  • 35
  • 55