Spring Session provides an API and implementations for managing a user’s session information, while also making it trivial to support clustered sessions without being tied to an application container specific solution. It also provides transparent integration with:
HttpSession- allows replacing the
HttpSessionin an application container (i.e. Tomcat) neutral way, with support for providing session IDs in headers to work with RESTful APIs.
WebSocket- provides the ability to keep the
HttpSessionalive when receiving WebSocket messages
WebSession- allows replacing the Spring WebFlux’s
WebSessionin an application container neutral way.
This Spring Session repository consists of the following modules:
Spring Session Core - provides core Spring Session functionalities and APIs
Spring Session Data Redis - provides
ReactiveSessionRepositoryimplementation backed by Redis and configuration support
Spring Session JDBC - provides
SessionRepositoryimplementation backed by a relational database and configuration support
Spring Session Hazelcast - provides
SessionRepositoryimplementation backed by Hazelcast and configuration support
Spring Session MongoDB - provides
SessionRepositoryimplementation backed by MongoDB and configuration support
Additional Spring Session modules can be found in the spring-session-data-geode repository.
We recommend you visit the Spring Session Reference and look through the "Samples and Guides" section to see which one best suits your needs.
Spring Session samples are available in the spring-session-samples directory.
Please see our Contributing guidelines for information on how to report issues, enhancements or security vulnerabilities.
Building from Source
Spring Session uses a Gradle-based build system.
In the instructions below,
./gradlew is invoked from the root of the source tree and serves as
a cross-platform, self-contained bootstrap mechanism for the build.
Check out sources
git clone [email protected]:spring-projects/spring-session.git
Install all spring-\* jars into your local Maven cache
Compile and test; build all jars, distribution zips, and docs
Code of Conduct
Please see our code of conduct.
Spring Session is Open Source software released under the Apache 2.0 license.