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: spring-session-docs/modules/ROOT/pages/api.adoc
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ If the `Session` were expired, the result would be null.
68
68
A `SessionRepository` is in charge of creating, retrieving, and persisting `Session` instances.
69
69
70
70
If possible, you should not interact directly with a `SessionRepository` or a `Session`.
71
-
Instead, developers should prefer interacting with `SessionRepository` and `Session` indirectly through the <<httpsession,`HttpSession`>> and <<websocket,WebSocket>> integration.
71
+
Instead, developers should prefer interacting with `SessionRepository` and `Session` indirectly through the xref:http-session.adoc#httpsession[`HttpSession`] and xref:web-socket.adoc#websocket[WebSocket] integration.
A `ReactiveSessionRepository` is in charge of creating, retrieving, and persisting `Session` instances in a non-blocking and reactive manner.
111
111
112
112
If possible, you should not interact directly with a `ReactiveSessionRepository` or a `Session`.
113
-
Instead, you should prefer interacting with `ReactiveSessionRepository` and `Session` indirectly through the <<websession,WebSession>> integration.
113
+
Instead, you should prefer interacting with `ReactiveSessionRepository` and `Session` indirectly through the xref:web-session.adoc#websession[WebSession] integration.
114
114
115
115
[[api-enablespringhttpsession]]
116
116
== Using `@EnableSpringHttpSession`
@@ -173,7 +173,7 @@ For additional information on how to create a `RedisConnectionFactory`, see the
173
173
=== Using `@EnableRedisHttpSession`
174
174
175
175
In a web environment, the simplest way to create a new `RedisIndexedSessionRepository` is to use `@EnableRedisHttpSession`.
176
-
You can find complete example usage in the <<samples>>.
176
+
You can find complete example usage in the xref:samples.adoc#samples[].
177
177
You can use the following attributes to customize the configuration:
178
178
179
179
* *maxInactiveIntervalInSeconds*: The amount of time before the session expires, in seconds.
The <<samples,Hazelcast Sample>> is a complete application that demonstrates how to use Spring Session with Hazelcast.
496
+
The xref:samples.adoc#samples[Hazelcast Sample] is a complete application that demonstrates how to use Spring Session with Hazelcast.
497
497
498
498
To run it, use the following command:
499
499
@@ -503,7 +503,7 @@ To run it, use the following command:
503
503
----
504
504
====
505
505
506
-
The <<samples,Hazelcast Spring Sample>> is a complete application that demonstrates how to use Spring Session with Hazelcast and Spring Security.
506
+
The xref:samples.adoc#samples[Hazelcast Spring Sample] is a complete application that demonstrates how to use Spring Session with Hazelcast and Spring Security.
507
507
508
508
It includes example Hazelcast `MapListener` implementations that support firing `SessionCreatedEvent`, `SessionDeletedEvent`, and `SessionExpiredEvent`.
509
509
@@ -547,7 +547,7 @@ For additional information on how to create and configure `JdbcTemplate` and `Pl
547
547
=== Using `@EnableJdbcHttpSession`
548
548
549
549
In a web environment, the simplest way to create a new `JdbcIndexedSessionRepository` is to use `@EnableJdbcHttpSession`.
550
-
You can find complete example usage in the <<samples>>
550
+
You can find complete example usage in the xref:samples.adoc#samples[]
551
551
You can use the following attributes to customize the configuration:
552
552
553
553
* *tableName*: The name of database table used by Spring Session to store sessions
@@ -622,7 +622,7 @@ For additional information on how to create and configure Hazelcast instance, se
622
622
To use https://hazelcast.org/[Hazelcast] as your backing source for the `SessionRepository`, you can add the `@EnableHazelcastHttpSession` annotation to a `@Configuration` class.
623
623
Doing so extends the functionality provided by the `@EnableSpringHttpSession` annotation but makes the `SessionRepository` for you in Hazelcast.
624
624
You must provide a single `HazelcastInstance` bean for the configuration to work.
625
-
You can find a complete configuration example in the <<samples>>.
625
+
You can find a complete configuration example in the xref:samples.adoc#samples[].
626
626
627
627
[[api-enablehazelcasthttpsession-customize]]
628
628
=== Basic Customization
@@ -641,7 +641,7 @@ Using a `MapListener` to respond to entries being added, evicted, and removed fr
641
641
642
642
Sessions are stored in a distributed `IMap` in Hazelcast.
643
643
The `IMap` interface methods are used to `get()` and `put()` Sessions.
644
-
Additionally, the `values()` method supports a `FindByIndexNameSessionRepository#findByIndexNameAndIndexValue` operation, together with appropriate `ValueExtractor` (which needs to be registered with Hazelcast). See the <<samples, Hazelcast Spring Sample>> for more details on this configuration.
644
+
Additionally, the `values()` method supports a `FindByIndexNameSessionRepository#findByIndexNameAndIndexValue` operation, together with appropriate `ValueExtractor` (which needs to be registered with Hazelcast). See the xref:samples.adoc#samples[ Hazelcast Spring Sample] for more details on this configuration.
645
645
The expiration of a session in the `IMap` is handled by Hazelcast's support for setting the time to live on an entry when it is `put()` into the `IMap`. Entries (sessions) that have been idle longer than the time to live are automatically removed from the `IMap`.
646
646
647
647
You should not need to configure any settings such as `max-idle-seconds` or `time-to-live-seconds` for the `IMap` within the Hazelcast configuration.
Copy file name to clipboardExpand all lines: spring-session-docs/modules/ROOT/pages/guides/java-hazelcast.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,7 +111,7 @@ with the same `SerializerConfiguration` of members.
111
111
112
112
== Servlet Container Initialization
113
113
114
-
Our <<security-spring-configuration,Spring Configuration>> created a Spring bean named `springSessionRepositoryFilter` that implements `Filter`.
114
+
Our xref:guides/java-security.adoc#security-spring-configuration[Spring Configuration] created a Spring bean named `springSessionRepositoryFilter` that implements `Filter`.
115
115
The `springSessionRepositoryFilter` bean is responsible for replacing the `HttpSession` with a custom implementation that is backed by Spring Session.
116
116
117
117
In order for our `Filter` to do its magic, Spring needs to load our `SessionConfig` class.
Copy file name to clipboardExpand all lines: spring-session-docs/modules/ROOT/pages/http-session.adoc
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ You can choose from enabling this by using either:
26
26
27
27
This section describes how to use Redis to back `HttpSession` by using Java based configuration.
28
28
29
-
NOTE: The <<samples, HttpSession Sample>> provides a working sample of how to integrate Spring Session and `HttpSession` by using Java configuration.
29
+
NOTE: The xref:samples.adoc#samples[ HttpSession Sample] provides a working sample of how to integrate Spring Session and `HttpSession` by using Java configuration.
30
30
You can read the basic steps for integration in the next few sections, but we encourage you to follow along with the detailed HttpSession Guide when integrating with your own application.
This section describes how to use Redis to back `HttpSession` by using XML based configuration.
38
38
39
-
NOTE: The <<samples, HttpSession XML Sample>> provides a working sample of how to integrate Spring Session and `HttpSession` using XML configuration.
39
+
NOTE: The xref:samples.adoc#samples[ HttpSession XML Sample] provides a working sample of how to integrate Spring Session and `HttpSession` using XML configuration.
40
40
You can read the basic steps for integration in the next few sections, but we encourage you to follow along with the detailed HttpSession XML Guide when integrating with your own application.
@@ -56,7 +56,7 @@ You can choose to do in any of the following ways:
56
56
57
57
This section describes how to use a relational database to back `HttpSession` when you use Java-based configuration.
58
58
59
-
NOTE: The <<samples, HttpSession JDBC Sample>> provides a working sample of how to integrate Spring Session and `HttpSession` by using Java configuration.
59
+
NOTE: The xref:samples.adoc#samples[ HttpSession JDBC Sample] provides a working sample of how to integrate Spring Session and `HttpSession` by using Java configuration.
60
60
You can read the basic steps for integration in the next few sections, but we encouraged you to follow along with the detailed HttpSession JDBC Guide when integrating with your own application.
This section describes how to use a relational database to back `HttpSession` when you use XML based configuration.
68
68
69
-
NOTE: The <<samples, HttpSession JDBC XML Sample>> provides a working sample of how to integrate Spring Session and `HttpSession` by using XML configuration.
69
+
NOTE: The xref:samples.adoc#samples[ HttpSession JDBC XML Sample] provides a working sample of how to integrate Spring Session and `HttpSession` by using XML configuration.
70
70
You can read the basic steps for integration in the next few sections, but we encourage you to follow along with the detailed HttpSession JDBC XML Guide when integrating with your own application.
This section describes how to use a relational database to back `HttpSession` when you use Spring Boot.
78
78
79
-
NOTE: The <<samples, HttpSession JDBC Spring Boot Sample>> provides a working sample of how to integrate Spring Session and `HttpSession` by using Spring Boot.
79
+
NOTE: The xref:samples.adoc#samples[ HttpSession JDBC Spring Boot Sample] provides a working sample of how to integrate Spring Session and `HttpSession` by using Spring Boot.
80
80
You can read the basic steps for integration in the next few sections, but we encourage you to follow along with the detailed HttpSession JDBC Spring Boot Guide when integrating with your own application.
@@ -88,7 +88,7 @@ Using Spring Session with `HttpSession` is enabled by adding a Servlet Filter be
88
88
89
89
This section describes how to use Hazelcast to back `HttpSession` by using Java-based configuration.
90
90
91
-
NOTE: The <<samples, Hazelcast Spring Sample>> provides a working sample of how to integrate Spring Session and `HttpSession` by using Java configuration.
91
+
NOTE: The xref:samples.adoc#samples[ Hazelcast Spring Sample] provides a working sample of how to integrate Spring Session and `HttpSession` by using Java configuration.
92
92
You can read the basic steps for integration in the next few sections, but we encourage you to follow along with the detailed Hazelcast Spring Guide when integrating with your own application.
@@ -158,7 +158,7 @@ This highlights why it is important that Spring Session's `SessionRepositoryFilt
158
158
159
159
Spring Session can work with RESTful APIs by letting the session be provided in a header.
160
160
161
-
NOTE: The <<samples, REST Sample>> provides a working sample of how to use Spring Session in a REST application to support authenticating with a header.
161
+
NOTE: The xref:samples.adoc#samples[ REST Sample] provides a working sample of how to use Spring Session in a REST application to support authenticating with a header.
162
162
You can follow the basic steps for integration described in the next few sections, but we encourage you to follow along with the detailed REST Guide when integrating with your own application.
Copy file name to clipboardExpand all lines: spring-session-docs/modules/ROOT/pages/index.adoc
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,8 +59,8 @@ The minimum requirements for Spring Session are:
59
59
* Java 8+.
60
60
* If you run in a Servlet Container (not required), Servlet 3.1+.
61
61
* If you use other Spring libraries (not required), the minimum required version is Spring 5.0.x.
62
-
* `@EnableRedisHttpSession` requires Redis 2.8+. This is necessary to support <<api-redisindexedsessionrepository-expiration,Session Expiration>>
63
-
* `@EnableHazelcastHttpSession` requires Hazelcast 3.6+. This is necessary to support <<api-enablehazelcasthttpsession-storage,`FindByIndexNameSessionRepository`>>
62
+
* `@EnableRedisHttpSession` requires Redis 2.8+. This is necessary to support xref:api.adoc#api-redisindexedsessionrepository-expiration[Session Expiration]
63
+
* `@EnableHazelcastHttpSession` requires Hazelcast 3.6+. This is necessary to support xref:api.adoc#api-enablehazelcasthttpsession-storage[`FindByIndexNameSessionRepository`]
64
64
65
65
NOTE: At its core, Spring Session has a required dependency only on `spring-jcl`.
66
-
For an example of using Spring Session without any other Spring dependencies, see the <<samples,hazelcast sample>> application.
66
+
For an example of using Spring Session without any other Spring dependencies, see the xref:samples.adoc#samples[hazelcast sample] application.
Copy file name to clipboardExpand all lines: spring-session-docs/modules/ROOT/pages/introduction.adoc
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,6 @@
4
4
Spring Session provides an API and implementations for managing a user's session information while also making it trivial to support clustered sessions without being tied to an application container-specific solution.
5
5
It also provides transparent integration with:
6
6
7
-
* <<httpsession,HttpSession>>: Allows replacing the `HttpSession` in an application container-neutral way, with support for providing session IDs in headers to work with RESTful APIs.
8
-
* <<websocket,WebSocket>>: Provides the ability to keep the `HttpSession` alive when receiving WebSocket messages
9
-
* <<websession,WebSession>>: Allows replacing the Spring WebFlux's `WebSession` in an application container-neutral way.
7
+
* xref:http-session.adoc#httpsession[HttpSession]: Allows replacing the `HttpSession` in an application container-neutral way, with support for providing session IDs in headers to work with RESTful APIs.
8
+
* xref:web-socket.adoc#websocket[WebSocket]: Provides the ability to keep the `HttpSession` alive when receiving WebSocket messages
9
+
* xref:web-session.adoc#websession[WebSession]: Allows replacing the Spring WebFlux's `WebSession` in an application container-neutral way.
Copy file name to clipboardExpand all lines: spring-session-docs/modules/ROOT/pages/web-socket.adoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,12 +21,12 @@ This means that, if we are actively chatting in our application and are not usin
21
21
[[websocket-usage]]
22
22
== WebSocket Usage
23
23
24
-
The <<samples, WebSocket Sample>> provides a working sample of how to integrate Spring Session with WebSockets.
24
+
The xref:samples.adoc#samples[ WebSocket Sample] provides a working sample of how to integrate Spring Session with WebSockets.
25
25
You can follow the basic steps for integration described in the next few headings, but we encourage you to follow along with the detailed WebSocket Guide when integrating with your own application.
26
26
27
27
[[websocket-httpsession]]
28
28
=== `HttpSession` Integration
29
29
30
-
Before using WebSocket integration, you should be sure that you have <<httpsession>> working first.
30
+
Before using WebSocket integration, you should be sure that you have xref:http-session.adoc#httpsession[] working first.
0 commit comments