I'm trying to get Spring Session timeout changed to a longer default value and also to have the cookie be persistent instead of session only. I'm using spring-session-jdbc for session storage.
I've put into the application.properties file the following:
#Distributed Session Storage for use by stateless apps
spring.session.store-type=jdbc
spring.session.jdbc.initialize-schema=always
server.servlet.session.timeout=1d
server.servlet.session.cookie.max-age=1d
server.servlet.session.cookie.same-site=strict
Other settings in the application.properties file are applied as expected.
It only seems to be the session and cookie settings that aren't being applied.
This is a Spring Boot Jar run via java -jar. The database is MariaDB and sessions are created and managed correctly, but I can't seem to change the cookie or timeout settings.
Help appreciated. -Michael/NewsRx
server.servlet.session.tracking-modes=cookieserver.servlet.are the configurations for the web server. If that's the case check this post out: stackoverflow.com/questions/55511297/…