Merge branch '3.1.x' into 3.2.x

Closes gh-2762
This commit is contained in:
Marcus Hert Da Coregio
2024-01-23 09:06:23 -03:00
14 changed files with 26 additions and 24 deletions

View File

@@ -1,7 +1,7 @@
[[api]]
= API Documentation
You can browse the complete https://docs.spring.io/spring-session/docs/{spring-session-version}/api/[Javadoc] online. The key APIs are described in the following sections:
You can browse the complete {docs-url}/spring-session/docs/{spring-session-version}/api/[Javadoc] online. The key APIs are described in the following sections:
* <<api-session>>
* <<api-sessionrepository>>
@@ -262,7 +262,7 @@ You can customize the serialization by creating a bean named `springSessionDefau
`RedisIndexedSessionRepository` is subscribed to receive events from Redis by using a `RedisMessageListenerContainer`.
You can customize the way those events are dispatched by creating a bean named `springSessionRedisTaskExecutor`, a bean `springSessionRedisSubscriptionExecutor`, or both.
You can find more details on configuring Redis task executors https://docs.spring.io/spring-data-redis/docs/{spring-data-redis-version}/reference/html/#redis:pubsub:subscribe:containers[here].
You can find more details on configuring Redis task executors {docs-url}/spring-data-redis/docs/{spring-data-redis-version}/reference/html/#redis:pubsub:subscribe:containers[here].
[[api-redisindexedsessionrepository-storage]]
=== Storage Details
@@ -614,7 +614,7 @@ include::{indexdoc-tests}[tags=new-jdbcindexedsessionrepository]
----
====
For additional information on how to create and configure `JdbcTemplate` and `PlatformTransactionManager`, see the https://docs.spring.io/spring/docs/{spring-core-version}/spring-framework-reference/data-access.html[Spring Framework Reference Documentation].
For additional information on how to create and configure `JdbcTemplate` and `PlatformTransactionManager`, see the {docs-url}/spring/docs/{spring-core-version}/spring-framework-reference/data-access.html[Spring Framework Reference Documentation].
[[api-jdbcindexedsessionrepository-config]]
=== Using `@EnableJdbcHttpSession`

View File

@@ -209,7 +209,7 @@ In order to be able to do that, you must be using the <<configuring-redisindexed
If you do not know the difference between the indexed and the default repository, you can go to <<choosing-between-regular-and-indexed,this section>>.
With the indexed repository configured, you can now start to listen to `SessionCreatedEvent`, `SessionDeletedEvent`, `SessionDestroyedEvent` and `SessionExpiredEvent` events.
There are a https://docs.spring.io/spring-framework/reference/core/beans/context-introduction.html#context-functionality-events[few ways to listen to application events] in Spring, we are going to use the `@EventListener` annotation.
There are a {docs-url}/spring-framework/reference/core/beans/context-introduction.html#context-functionality-events[few ways to listen to application events] in Spring, we are going to use the `@EventListener` annotation.
====
[source,java]

View File

@@ -71,7 +71,7 @@ spring.session.jdbc.table-name=SPRING_SESSION # Name of the database table used
----
====
For more information, see the https://docs.spring.io/spring-boot/docs/{spring-boot-version}/reference/htmlsingle/#boot-features-session[Spring Session] portion of the Spring Boot documentation.
For more information, see the {docs-url}/spring-boot/docs/{spring-boot-version}/reference/htmlsingle/#boot-features-session[Spring Session] portion of the Spring Boot documentation.
[[httpsession-jdbc-boot-configuration]]
== Configuring the `DataSource`
@@ -89,7 +89,7 @@ spring.datasource.password= # Login password of the database.
----
====
For more information, see the https://docs.spring.io/spring-boot/docs/{spring-boot-version}/reference/htmlsingle/#boot-features-configure-datasource[Configure a DataSource] portion of the Spring Boot documentation.
For more information, see the {docs-url}/spring-boot/docs/{spring-boot-version}/reference/htmlsingle/#boot-features-configure-datasource[Configure a DataSource] portion of the Spring Boot documentation.
[[httpsession-jdbc-boot-servlet-configuration]]
== Servlet Container Initialization

View File

@@ -103,7 +103,7 @@ spring.data.mongodb.database=prod
----
====
For more information, refer to https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-connecting-to-mongodb[Connecting to MongoDB] portion of the Spring Boot documentation.
For more information, refer to {docs-url}/spring-boot/docs/current/reference/htmlsingle/#boot-features-connecting-to-mongodb[Connecting to MongoDB] portion of the Spring Boot documentation.
[[boot-servlet-configuration]]
== Servlet Container Initialization

View File

@@ -68,7 +68,7 @@ spring.session.redis.namespace=spring:session # Namespace for keys used to store
----
====
For more information, see the https://docs.spring.io/spring-boot/docs/{spring-boot-version}/reference/htmlsingle/#boot-features-session[Spring Session] portion of the Spring Boot documentation.
For more information, see the {docs-url}/spring-boot/docs/{spring-boot-version}/reference/htmlsingle/#boot-features-session[Spring Session] portion of the Spring Boot documentation.
[[boot-redis-configuration]]
== Configuring the Redis Connection
@@ -86,7 +86,7 @@ spring.data.redis.port=6379 # Redis server port.
----
====
For more information, see the https://docs.spring.io/spring-boot/docs/{spring-boot-version}/reference/htmlsingle/#boot-features-connecting-to-redis[Connecting to Redis] portion of the Spring Boot documentation.
For more information, see the {docs-url}/spring-boot/docs/{spring-boot-version}/reference/htmlsingle/#boot-features-connecting-to-redis[Connecting to Redis] portion of the Spring Boot documentation.
[[boot-servlet-configuration]]
== Servlet Container Initialization

View File

@@ -100,7 +100,7 @@ We configure the H2 database to create database tables by using the SQL script t
<3> We create a `transactionManager` that manages transactions for previously configured `dataSource`.
====
For additional information on how to configure data access related concerns, see the https://docs.spring.io/spring/docs/{spring-core-version}/reference/html/data-access.html[Spring Framework Reference Documentation].
For additional information on how to configure data access related concerns, see the {docs-url}/spring/docs/{spring-core-version}/reference/html/data-access.html[Spring Framework Reference Documentation].
== Java Servlet Container Initialization

View File

@@ -101,7 +101,7 @@ The filter is in charge of replacing the `HttpSession` implementation to be back
In this instance, Spring Session is backed by Redis.
<2> We create a `RedisConnectionFactory` that connects Spring Session to the Redis Server.
We configure the connection to connect to localhost on the default port (6379).
For more information on configuring Spring Data Redis, see the https://docs.spring.io/spring-data/data-redis/docs/{spring-data-redis-version}/reference/html/[reference documentation].
For more information on configuring Spring Data Redis, see the {docs-url}/spring-data/data-redis/docs/{spring-data-redis-version}/reference/html/[reference documentation].
====
== Java Servlet Container Initialization

View File

@@ -101,7 +101,7 @@ The filter is in charge of replacing the `HttpSession` implementation to be back
In this instance, Spring Session is backed by Redis.
<2> We create a `RedisConnectionFactory` that connects Spring Session to the Redis Server.
We configure the connection to connect to localhost on the default port (6379).
For more information on configuring Spring Data Redis, see the https://docs.spring.io/spring-data/data-redis/docs/{spring-data-redis-version}/reference/html/[reference documentation].
For more information on configuring Spring Data Redis, see the {docs-url}/spring-data/data-redis/docs/{spring-data-redis-version}/reference/html/[reference documentation].
<3> We customize Spring Session's HttpSession integration to use HTTP headers to convey the current session information instead of cookies.
====

View File

@@ -99,7 +99,7 @@ The filter is in charge of replacing the `HttpSession` implementation to be back
In this instance Spring Session is backed by Redis.
<2> We create a `RedisConnectionFactory` that connects Spring Session to the Redis Server.
We configure the connection to connect to localhost on the default port (6379)
For more information on configuring Spring Data Redis, see the https://docs.spring.io/spring-data/data-redis/docs/{spring-data-redis-version}/reference/html/[reference documentation].
For more information on configuring Spring Data Redis, see the {docs-url}/spring-data/data-redis/docs/{spring-data-redis-version}/reference/html/[reference documentation].
====
== Servlet Container Initialization

View File

@@ -102,7 +102,7 @@ We configure the H2 database to create database tables by using the SQL script t
<3> We create a `transactionManager` that manages transactions for previously configured `dataSource`.
====
For additional information on how to configure data access-related concerns, see the https://docs.spring.io/spring/docs/{spring-core-version}/spring-framework-reference/data-access.html[Spring Framework Reference Documentation].
For additional information on how to configure data access-related concerns, see the {docs-url}/spring/docs/{spring-core-version}/spring-framework-reference/data-access.html[Spring Framework Reference Documentation].
== XML Servlet Container Initialization
@@ -121,7 +121,7 @@ include::{samples-dir}spring-session-sample-xml-jdbc/src/main/webapp/WEB-INF/web
----
====
The https://docs.spring.io/spring/docs/{spring-core-version}/spring-framework-reference/core.html#context-create[`ContextLoaderListener`] reads the `contextConfigLocation` and picks up our session.xml configuration.
The {docs-url}/spring/docs/{spring-core-version}/spring-framework-reference/core.html#context-create[`ContextLoaderListener`] reads the `contextConfigLocation` and picks up our session.xml configuration.
Last, we need to ensure that our Servlet Container (that is, Tomcat) uses our `springSessionRepositoryFilter` for every request.
The following snippet performs this last step for us:
@@ -134,7 +134,7 @@ include::{samples-dir}spring-session-sample-xml-jdbc/src/main/webapp/WEB-INF/web
----
====
The https://docs.spring.io/spring-framework/docs/{spring-core-version}/javadoc-api/org/springframework/web/filter/DelegatingFilterProxy.html[`DelegatingFilterProxy`] looks up a bean named `springSessionRepositoryFilter` and casts it to a `Filter`.
The {docs-url}/spring-framework/docs/{spring-core-version}/javadoc-api/org/springframework/web/filter/DelegatingFilterProxy.html[`DelegatingFilterProxy`] looks up a bean named `springSessionRepositoryFilter` and casts it to a `Filter`.
For every request on which `DelegatingFilterProxy` is invoked, the `springSessionRepositoryFilter` is invoked.
// end::config[]

View File

@@ -102,7 +102,7 @@ The filter is in charge of replacing the `HttpSession` implementation to be back
In this instance, Spring Session is backed by Redis.
<2> We create a `RedisConnectionFactory` that connects Spring Session to the Redis Server.
We configure the connection to connect to localhost on the default port (6379)
For more information on configuring Spring Data Redis, see the https://docs.spring.io/spring-data/data-redis/docs/{spring-data-redis-version}/reference/html/[reference documentation].
For more information on configuring Spring Data Redis, see the {docs-url}/spring-data/data-redis/docs/{spring-data-redis-version}/reference/html/[reference documentation].
====
== XML Servlet Container Initialization
@@ -122,7 +122,7 @@ include::{samples-dir}spring-session-sample-xml-redis/src/main/webapp/WEB-INF/we
----
====
The https://docs.spring.io/spring/docs/{spring-core-version}/spring-framework-reference/core.html#context-create[`ContextLoaderListener`] reads the contextConfigLocation and picks up our session.xml configuration.
The {docs-url}/spring/docs/{spring-core-version}/spring-framework-reference/core.html#context-create[`ContextLoaderListener`] reads the contextConfigLocation and picks up our session.xml configuration.
Last, we need to ensure that our Servlet Container (that is, Tomcat) uses our `springSessionRepositoryFilter` for every request.
The following snippet performs this last step for us:
@@ -135,7 +135,7 @@ include::{samples-dir}spring-session-sample-xml-redis/src/main/webapp/WEB-INF/we
----
====
The https://docs.spring.io/spring-framework/docs/{spring-core-version}/javadoc-api/org/springframework/web/filter/DelegatingFilterProxy.html[`DelegatingFilterProxy`] looks up a Bean by the name of `springSessionRepositoryFilter` and cast it to a `Filter`.
The {docs-url}/spring-framework/docs/{spring-core-version}/javadoc-api/org/springframework/web/filter/DelegatingFilterProxy.html[`DelegatingFilterProxy`] looks up a Bean by the name of `springSessionRepositoryFilter` and cast it to a `Filter`.
For every request that `DelegatingFilterProxy` is invoked, the `springSessionRepositoryFilter` is invoked.
// end::config[]

View File

@@ -6,7 +6,7 @@ Spring Session provides integration with Spring Security.
[[spring-security-rememberme]]
== Spring Security Remember-me Support
Spring Session provides integration with https://docs.spring.io/spring-security/site/docs/{spring-security-core-version}/reference/html5/#servlet-rememberme[Spring Security's Remember-me Authentication].
Spring Session provides integration with {docs-url}/spring-security/site/docs/{spring-security-core-version}/reference/html5/#servlet-rememberme[Spring Security's Remember-me Authentication].
The support:
* Changes the session expiration length

View File

@@ -37,7 +37,7 @@ This is what is in charge of replacing the `WebSession` implementation to be bac
In this instance, Spring Session is backed by Redis.
<2> We create a `RedisConnectionFactory` that connects Spring Session to the Redis Server.
We configure the connection to connect to localhost on the default port (6379)
For more information on configuring Spring Data Redis, see the https://docs.spring.io/spring-data/data-redis/docs/{spring-data-redis-version}/reference/html/[reference documentation].
For more information on configuring Spring Data Redis, see the {docs-url}/spring-data/data-redis/docs/{spring-data-redis-version}/reference/html/[reference documentation].
====
[[websession-how]]
@@ -113,4 +113,4 @@ public class SpringSessionWebSessionStore<S extends Session> implements WebSessi
====
To be detected by Spring WebFlux, this custom `WebSessionStore` needs to be registered with `ApplicationContext` as a bean named `webSessionManager`.
For additional information on Spring WebFlux, see the https://docs.spring.io/spring-framework/docs/{spring-core-version}/reference/html/web-reactive.html[Spring Framework Reference Documentation].
For additional information on Spring WebFlux, see the {docs-url}/spring-framework/docs/{spring-core-version}/reference/html/web-reactive.html[Spring Framework Reference Documentation].

View File

@@ -54,11 +54,13 @@ def generateAttributes() {
? springBootVersion.substring(0, springBootVersion.indexOf("-"))
: springBootVersion
def ghTag = snapshotBuild ? 'main' : project.version
def springBootRefDocs = "https://docs.spring.io/spring-boot/docs/${springBootVersion}/reference/html"
def docsUrl = 'https://docs.spring.io'
def springBootRefDocs = "${docsUrl}/spring-boot/docs/${springBootVersion}/reference/html"
return ['gh-tag':ghTag,
'spring-boot-version': springBootVersion,
'spring-boot-ref-docs': springBootRefDocs.toString(),
'spring-session-version': project.version]
'spring-session-version': project.version,
'docs-url': docsUrl]
}
sourceSets {