Skip to content

Commit e8fe916

Browse files
committed
Merge branch '4.0.x'
Closes gh-49705
2 parents c5cb7c4 + 1e5fd25 commit e8fe916

1 file changed

Lines changed: 7 additions & 13 deletions

File tree

documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/web/spring-session.adoc

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,16 @@
22
= Spring Session
33

44
Spring Boot provides {url-spring-session-site}[Spring Session] auto-configuration for a range of data stores.
5-
When building a servlet web application, the following stores can be auto-configured:
5+
For each data store, a specific Spring Boot starter is provided.
66

7-
* Redis
8-
* JDBC
7+
When building a servlet web application, the following stores can be auto-configured:
98

10-
Additionally, {url-spring-boot-for-apache-geode-site}[Spring Boot for Apache Geode] provides {url-spring-boot-for-apache-geode-docs}#geode-session[auto-configuration for using Apache Geode as a session store].
9+
* Redis (`spring-boot-starter-session-data-redis`)
10+
* JDBC (`spring-boot-starter-session-jdbc`)
1111

1212
The servlet auto-configuration replaces the need to use `@Enable*HttpSession`.
1313

14-
If a single Spring Session module is present on the classpath, Spring Boot uses that store implementation automatically.
15-
If you have more than one implementation, Spring Boot uses the following order for choosing a specific implementation:
16-
17-
. Redis
18-
. JDBC
19-
. If neither Redis nor JDBC are available, we do not configure a javadoc:org.springframework.session.SessionRepository[].
20-
21-
When building a reactive web application, the Redis store can be auto-configured.
14+
When building a reactive web application, the Redis store can be auto-configured by depending on `spring-boot-starter-session-data-redis`.
2215
This replaces the need to use `@EnableRedisWebSession`.
2316

2417
Each store has specific additional settings.
@@ -37,4 +30,5 @@ If that property is not set with a servlet web application, the auto-configurati
3730

3831
You can take control over Spring Session's configuration using `@Enable*HttpSession` (servlet) or `@EnableRedisWebSession` (reactive).
3932
This will cause the auto-configuration to back off.
40-
Spring Session can then be configured using the annotation's attributes rather than the previously described configuration properties.
33+
Alternatively, depend on the relevant Spring Session module directly rather than using one of Spring Boot's starters for Spring Session.
34+
With either approach, Spring Session can then be configured using the annotation's attributes rather than the previously described configuration properties.

0 commit comments

Comments
 (0)