0

For my application after specific time the application session has to be expired... i am using spring boot 1.5.9.RELEASE i tried this way in application.properties file server.session.timeout=120 But i didn't find it working....

krishna
  • 41
  • 4
  • server.connection-timeout should have a dash and not a period between connection and timeout. – Compass Jul 09 '18 at 14:37
  • it is not server.connection, it is server.session.... and i wanmt to know the difference as well between server.session.timeout and server.connection-timeout? – krishna Jul 09 '18 at 14:42
  • Aha, might be this. Looks promising: https://stackoverflow.com/questions/40974955/spring-boot-java-config-set-session-timeout – Compass Jul 09 '18 at 14:45
  • same thing i have tried Compass.. but it is not working – krishna Jul 09 '18 at 14:50
  • i am using embedded tomcat @Mahozad – krishna Jul 09 '18 at 14:52
  • Are you testing it with a browser? If so, you need to be aware that your browser will cache and re-send the basic authentication credentials so you get a new session every time. You can mimic this behaviour and see what's happening by using curl – NullPointer Jul 09 '18 at 15:34
  • How to use the curl??? – krishna Jul 09 '18 at 15:41

1 Answers1

0

Common servlet container settings can be configured using Spring Environment properties. Usually you would define the properties in your application.properties file.

Session settings: session timeout (server.session.timeout)

Reference: https://docs.spring.io/spring-boot/docs/1.5.9.RELEASE/reference/htmlsingle/ section: 27.3.4

Hari Chukkala
  • 402
  • 5
  • 5