Reputation: 3811
I configured the application.properties to have a one second session time out. (I was just doing this to test session time out in my application. The real application will have a much longer session)
server.session.timeout=1
server.session.tracking-modes=cookie
In the browser, i refreshed the page every 5 seconds to see if JSESSIONID is changing. But looks like it isn't.
Although, I tried refreshing after a while, the JSESSIONID changed.
Is there a minimum session time out in spring boot?
Upvotes: 1
Views: 1831
Reputation: 1967
server.session.timeout
works only in case of embedded
tomcat container and not in case of Standalone
.
If you want to set it , you have to configure it in web.xml
something like below:
<session-config>
<session-timeout>1</session-timeout>
</session-config>
so in this case, session timeout will be set to 1 min
Upvotes: 1