This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Session 3.4.0!spring-doc.cn

Samples and Guides (Start Here)

To get started with Spring Session, the best place to start is our Sample Applications.spring-doc.cn

Table 1. Sample Applications that use Spring Boot
Source Description Guide

HttpSession with Redisspring-doc.cn

Demonstrates how to use Spring Session to replace the HttpSession with Redis.spring-doc.cn

HttpSession with Redis Guidespring-doc.cn

HttpSession with JDBCspring-doc.cn

Demonstrates how to use Spring Session to replace the HttpSession with a relational database store.spring-doc.cn

HttpSession with JDBC Guidespring-doc.cn

HttpSession with Hazelcastspring-doc.cn

Demonstrates how to use Spring Session to replace the HttpSession with Hazelcast.spring-doc.cn

Find by Usernamespring-doc.cn

Demonstrates how to use Spring Session to find sessions by username.spring-doc.cn

Find by Username Guidespring-doc.cn

WebSocketsspring-doc.cn

Demonstrates how to use Spring Session with WebSockets.spring-doc.cn

WebSockets Guidespring-doc.cn

WebFluxspring-doc.cn

Demonstrates how to use Spring Session to replace the Spring WebFlux’s WebSession with Redis.spring-doc.cn

WebFlux with Custom Cookiespring-doc.cn

Demonstrates how to use Spring Session to customize the Session cookie in a WebFlux based application.spring-doc.cn

WebFlux with Custom Cookie Guidespring-doc.cn

HttpSession with Redis JSON serializationspring-doc.cn

Demonstrates how to use Spring Session to replace the HttpSession with Redis using JSON serialization.spring-doc.cn

Spring Session with MongoDB Repositories (servlet-based)spring-doc.cn

Demonstrates how to back Spring Session with traditional MongoDB repositories.spring-doc.cn

Spring Session with MongoDB Repositoriesspring-doc.cn

Spring Session with MongoDB Repositories (reactive)spring-doc.cn

Demonstrates how to back Spring Session with reactive MongoDB repositories.spring-doc.cn

Spring Session with MongoDB Repositoriesspring-doc.cn

Table 2. Sample Applications that use Spring Java-based configuration
Source Description Guide

HttpSession with Redisspring-doc.cn

Demonstrates how to use Spring Session to replace the HttpSession with Redis.spring-doc.cn

HttpSession with Redis Guidespring-doc.cn

HttpSession with JDBCspring-doc.cn

Demonstrates how to use Spring Session to replace the HttpSession with a relational database store.spring-doc.cn

HttpSession with JDBC Guidespring-doc.cn

HttpSession with Hazelcastspring-doc.cn

Demonstrates how to use Spring Session to replace the HttpSession with Hazelcast.spring-doc.cn

HttpSession with Hazelcast Guidespring-doc.cn

Custom Cookiespring-doc.cn

Demonstrates how to use Spring Session and customize the cookie.spring-doc.cn

Custom Cookie Guidespring-doc.cn

Spring Securityspring-doc.cn

Demonstrates how to use Spring Session with an existing Spring Security application.spring-doc.cn

Spring Security Guidespring-doc.cn

RESTspring-doc.cn

Demonstrates how to use Spring Session in a REST application to support authenticating with a header.spring-doc.cn

REST Guidespring-doc.cn

Table 3. Sample Applications that use Spring XML-based configuration
Source Description Guide

HttpSession with Redisspring-doc.cn

Demonstrates how to use Spring Session to replace the HttpSession with a Redis store.spring-doc.cn

HttpSession with Redis Guidespring-doc.cn

HttpSession with JDBCspring-doc.cn

Demonstrates how to use Spring Session to replace the HttpSession with a relational database store.spring-doc.cn

HttpSession with JDBC Guidespring-doc.cn

Table 4. Miscellaneous sample Applications
Source Description Guide

Hazelcastspring-doc.cn

Demonstrates how to use Spring Session with Hazelcast in a Java EE application.spring-doc.cn