You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/web/spring-session.adoc
+7-13Lines changed: 7 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,23 +2,16 @@
2
2
= Spring Session
3
3
4
4
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.
6
6
7
-
* Redis
8
-
* JDBC
7
+
When building a servlet web application, the following stores can be auto-configured:
9
8
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].
The servlet auto-configuration replaces the need to use `@Enable*HttpSession`.
13
13
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`.
22
15
This replaces the need to use `@EnableRedisWebSession`.
23
16
24
17
Each store has specific additional settings.
@@ -37,4 +30,5 @@ If that property is not set with a servlet web application, the auto-configurati
37
30
38
31
You can take control over Spring Session's configuration using `@Enable*HttpSession` (servlet) or `@EnableRedisWebSession` (reactive).
39
32
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