spring-session
spring-session copied to clipboard
Add SessionContextHolder
Add the Session to a SessionContextHolder similar to SecurityContextHolder. The SessionContextHolder would store the Session in a ThreadLocal. This will allow users to access the current Session anywhere within their stack. For example:
Session session = SessionContextHolder.getSession();
We would also want to have the SessionRepositoryFilter populate and clear out the SessionContextHolder (similar to SecurityContextPersistenceFilter).