Browse Source

Polish Spring Session removals

See gh-47661
See gh-47662
pull/47664/head
Andy Wilkinson 2 months ago
parent
commit
6c12521ad2
  1. 4
      configuration-metadata/spring-boot-configuration-metadata-changelog-generator/build.gradle
  2. 8
      documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/web/spring-session.adoc

4
configuration-metadata/spring-boot-configuration-metadata-changelog-generator/build.gradle

@ -116,7 +116,9 @@ def dependenciesOf(String version) { @@ -116,7 +116,9 @@ def dependenciesOf(String version) {
"spring-boot-sendgrid",
"spring-boot-servlet",
"spring-boot-session",
"spring-boot-session-data-mongodb",
"spring-boot-session-data-redis",
"spring-boot-session-hazelcast",
"spring-boot-session-jdbc",
"spring-boot-sql",
"spring-boot-test-autoconfigure",
@ -153,6 +155,8 @@ def dependenciesOf(String version) { @@ -153,6 +155,8 @@ def dependenciesOf(String version) {
}
if (version.equals("4.0.0-RC1")) {
modules -= [
"spring-boot-session-data-mongodb",
"spring-boot-session-hazelcast",
"spring-boot-tx"
]
modules += [

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

@ -16,11 +16,10 @@ If you have more than one implementation, Spring Boot uses the following order f @@ -16,11 +16,10 @@ If you have more than one implementation, Spring Boot uses the following order f
. Redis
. JDBC
. If neither Redis or JDBC are available, we do not configure a javadoc:org.springframework.session.SessionRepository[].
. If neither Redis nor JDBC are available, we do not configure a javadoc:org.springframework.session.SessionRepository[].
When building a reactive web application, the Redis store can be auto-configured.
The reactive auto-configuration replaces the need to use `@Enable*WebSession`.
This replaces the need to use `@EnableRedisWebSession`.
Each store has specific additional settings.
For instance, it is possible to customize the name of the table for the JDBC store, as shown in the following example:
@ -36,7 +35,6 @@ spring: @@ -36,7 +35,6 @@ spring:
For setting the timeout of the session you can use the configprop:spring.session.timeout[] property.
If that property is not set with a servlet web application, the auto-configuration falls back to the value of configprop:server.servlet.session.timeout[].
You can take control over Spring Session's configuration using `@Enable*HttpSession` (servlet) or `@Enable*WebSession` (reactive).
You can take control over Spring Session's configuration using `@Enable*HttpSession` (servlet) or `@EnableRedisWebSession` (reactive).
This will cause the auto-configuration to back off.
Spring Session can then be configured using the annotation's attributes rather than the previously described configuration properties.

Loading…
Cancel
Save