You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When restarting an application with an embedded Tomcat, Tomcat is not able to restore the sessions since Spring generates a new temporary directory on every start (e.g. /tmp/tomcat.5990562997404648887.8080 on my linux machine). However, restoring the sessions would be really useful, especially during development.
I figured out a way to work around this by setting server.tomcat.basedir=/tmp. However, this is inconvenient since it has to be changed depending on the operating system.
IMHO Spring Boot should not generate a new random temporary directory on each start, but use something static to make persistent sessions work out-of-the-box. If this is not possible for some reason, this should at least be documented since it took me quite some time to figure out.