Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application property "server.servlet.session.timeout" is not working in Spring Boot project

According to the documentation of Spring Boot, session timeout can be configured by setting

server.servlet.session.timeout= 300s

in application.properties file. In this post and in Spring Boot documentation it is also said so. But unfortunately this is not working for me.

Is there any other configuration to get expected result?

like image 971
Avijit Barua Avatar asked Jan 15 '19 06:01

Avijit Barua


1 Answers

You can use Approach 1:

server.servlet.session.timeout=30s
server.servlet.session.cookie.max-age=30s

It is working fine for me

like image 88
vivekdubey Avatar answered Oct 04 '22 11:10

vivekdubey