跳到主要内容

示例和指南(从这里开始)

QWen Max 中英对照 Samples & Guides (Start Here) Samples and Guides (Start Here)

要开始使用 Spring Session,最好的起点是我们的示例应用程序。

表 1. 使用 Spring Boot 的示例应用程序

描述指南
HttpSession with Redis演示如何使用 Spring Session 通过 Redis 替换 HttpSessionHttpSession with Redis Guide
HttpSession with JDBC演示如何使用 Spring Session 通过关系型数据库存储替换 HttpSessionHttpSession with JDBC Guide
HttpSession with Hazelcast演示如何使用 Spring Session 通过 Hazelcast 替换 HttpSession
Find by Username演示如何使用 Spring Session 通过用户名查找会话。Find by Username Guide
WebSockets演示如何在 WebSockets 中使用 Spring Session。WebSockets Guide
WebFlux演示如何使用 Spring Session 通过 Redis 替换 Spring WebFlux 的 WebSession
WebFlux with Custom Cookie演示如何在基于 WebFlux 的应用程序中使用 Spring Session 自定义会话 cookie。WebFlux with Custom Cookie Guide
HttpSession with Redis JSON serialization演示如何使用 Spring Session 通过 JSON 序列化将 HttpSession 替换为 Redis。
Spring Session with MongoDB Repositories (servlet-based)演示如何使用传统的 MongoDB 仓库支持 Spring Session。Spring Session with MongoDB Repositories
Spring Session with MongoDB Repositories (reactive)演示如何使用响应式的 MongoDB 仓库支持 Spring Session。Spring Session with MongoDB Repositories

表 2. 使用基于 Spring Java 的配置的示例应用程序

描述指南
HttpSession with Redis演示如何使用 Spring Session 通过 Redis 替换 HttpSessionHttpSession with Redis Guide
HttpSession with JDBC演示如何使用 Spring Session 通过关系型数据库存储替换 HttpSessionHttpSession with JDBC Guide
HttpSession with Hazelcast演示如何使用 Spring Session 通过 Hazelcast 替换 HttpSessionHttpSession with Hazelcast Guide
Custom Cookie演示如何使用 Spring Session 并自定义 cookie。Custom Cookie Guide
Spring Security演示如何在现有的 Spring Security 应用程序中使用 Spring Session。Spring Security Guide
REST演示如何在 REST 应用程序中使用 Spring Session 以支持通过 header 进行身份验证。REST Guide

表 3. 使用基于 Spring XML 配置的示例应用程序

Source描述指南
HttpSession with Redis演示如何使用 Spring Session 将 HttpSession 替换为 Redis 存储。HttpSession with Redis 指南
HttpSession with JDBC演示如何使用 Spring Session 将 HttpSession 替换为关系型数据库存储。HttpSession with JDBC 指南

表 4. 其他示例应用程序

源代码描述指南
Hazelcast演示如何在 Java EE 应用程序中使用 Hazelcast 与 Spring Session。

章节摘要