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: docs/modules/spring/pages/hazelcast-spring-session.adoc
+22-6Lines changed: 22 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,13 +51,13 @@ dependencies {
51
51
52
52
TIP: Hazelcast Spring Session uses the same major version number as Spring Boot it was created for. For Spring Boot 4.x, the compatible Hazelcast Spring Session will be always 4.x.
53
53
54
-
=== Migrate from Spring Session Hazelcast 3.x
54
+
== Migrate from Spring Session Hazelcast 3.x
55
55
56
56
From version 4.0, the Hazelcast integration with Spring Session is owned by the Hazelcast team.
57
57
58
58
To migrate your application from using Spring Session Hazelcast 3.x to the new Hazelcast Spring Session 4.x:
59
59
60
-
. Change the GroupId to `com.hazelcast` and artifactId to `hazelcast-spring-session`.
60
+
. Change the GroupId to `com.hazelcast.spring` and artifactId to `hazelcast-spring-session`.
61
61
. Update your code and change the packages. All Hazelcast-specific classes were moved from `org.springframework.session.hazelcast` to `com.hazelcast.spring.session`.
62
62
. Remove this configuration for `PrincipalNameExtractor`:
. Index configuration for `PRINCIPAL_ATTRIBUTE_NAME` **if** no other IMap customization is wanted.
87
-
86
+
+
87
+
Note that this call should be made before instance creation (before the call to `Hazelcast.newHazelcastInstance`).
88
+
. Remove index configuration for `PRINCIPAL_ATTRIBUTE_NAME` **if** no other IMap customization is wanted; it will be configured automatically. If you want to further customize the session IMap, you can either:
89
+
- create `MapConfig` manually and then create an index of type `HASH` on the `principalName` attribute.
90
+
- create a bean of type `SessionMapCustomizer` to apply your customizations on predefined `MapConfig`.
91
+
92
+
=== List of breaking changes
93
+
94
+
Spring Session 4.0.0 is a major release. It contains the following breaking changes:
95
+
96
+
- Group ID and artifact ID are changed to `com.hazelcast.spring` / `hazelcast-spring-session`.
97
+
- The main package name is changed from `org.springframework.session.hazelcast` to `com.hazelcast.spring.session`.
98
+
- Serialization is reworked. It no longer uses an optional `HazelcastSessionSerializer`, but relies on Compact Serialization with two new serializers: `com.hazelcast.spring.session.AttributeValueCompactSerializer` and `com.hazelcast.spring.session.HazelcastSessionCompactSerializer`. Additionally, a `SessionUpdateEntryProcessor` serializer will be configured automatically on server nodes if a JAR is deployed on server nodes.
99
+
- The binary representation of the data is changed. Instead of using Spring's `MapSession`, it uses `com.hazelcast.spring.session.BackingMapSession` with attributes stored as `com.hazelcast.spring.session.AttributeValue`. This change enables true client-server deployments without the need for any custom code deployment on server nodes for classes used as session attributes.
100
+
- Method `void setDefaultMaxInactiveInterval(Integer defaultMaxInactiveInterval)` in `HazelcastIndexedSessionRepository` is removed. Use an alternative with `Duration` as a parameter.
101
+
- Most of the setter methods in `HazelcastIndexedSessionRepository` now return `HazelcastIndexedSessionRepository` (`this`) for fluent API.
102
+
- The default logging framework is changed to SLF4J; the default annotations library is now JSpecify.
Copy file name to clipboardExpand all lines: docs/modules/spring/pages/spring-session-guide.adoc
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,11 +101,12 @@ This section describes how to work with the Hazelcast Spring Security sample app
101
101
102
102
=== Running the sample application
103
103
104
-
You can run the sample by obtaining the link:https://docs.hazelcast.com/hazelcast/latest/spring/spring-session-3.5.2.zip[source code] and invoking the following command:
104
+
You can run the sample by obtaining the link:https://github.com/hazelcast/hazelcast-code-samples/tree/master/spring/spring-session-servlet[source code] and invoking the following command:
0 commit comments