4.0.0 is a major release and the first under Hazelcast stewardship. To reflect the module's new ownership, we have updated the package name and Maven coordinates. Since this is a breaking change, it required a major version and gave us room to make further improvements in areas that previously couldn’t be changed safely.
What’s Changed
-
The project was separated from the core Spring Session module.
-
Build scripts, GitHub Actions etc. were all modified to work with the new repository.
-
Code Samples were moved to https://github.com/hazelcast/hazelcast-code-samples/tree/master/spring
-
Group ID and artifact ID were changed to
com.hazelcast.springandhazelcast-spring-sessionrespectively. [breaking change] -
The main package was changed from
org.springframework.session.hazelcasttocom.hazelcast.spring.session. [breaking change] -
The binary representation of the data was changed. This change was done to enable true client-server deployments, without the need for any custom code deployment on server nodes for classes used as session attributes. [breaking change]
-
The serialization method was changed. It no longer uses an optional
HazelcastSessionSerializer, but relies on Compact Serialization with two new serializers:com.hazelcast.spring.session.AttributeValueCompactSerializerandcom.hazelcast.spring.session.HazelcastSessionCompactSerializer. Additionally the serializer ofSessionUpdateEntryProcessorwill be configured automatically on server nodes if the Hazelcast Spring Session jar is deployed on server nodes to allow faster session updates. [breaking change] -
Handling of
HazelcastIndexedSessionRepository.PRINCIPAL_NAME_ATTRIBUTEwas simplified; the AttributeConfig withHazelcast4PrincipalNameExtractoris no longer needed. [breaking change] -
Index on
PRINCIPAL_NAME_ATTRIBUTEwill be added automatically if possible (no prior configuration for session map was submitted). -
Lots of small improvements and cleanups like: method
void setDefaultMaxInactiveInterval(Integer defaultMaxInactiveInterval)inHazelcastIndexedSessionRepositorywas removed (was deprecated since 3.0), most of the setter methods inHazelcastIndexedSessionRepositorynow returnHazelcastIndexedSessionRepository(this) for a more fluent API. [breaking change] -
The project now fully supports Java Modules.
-
The default logging framework was changed to SLF4J; the default annotations library is now JSpecify. [breaking change]
You can find the documentation here: https://docs.hazelcast.com/hazelcast/latest/spring/hazelcast-spring-session
Contributors
@TomaszGaweda
@ldziedziul
@JackPGreen
Special thanks to all contributors! 👏
We would like to especially thank users who shared with us their testing results and other feedback: @sj5677 @mmoayyed @luki1051. It's great to have a community like you!
Usage
Maven
<dependency>
<groupId>com.hazelcast.spring</groupId>
<artifactId>hazelcast-spring-session</artifactId>
<version>4.0.0</version>
</dependency>Gradle
implementation("com.hazelcast.spring:hazelcast-spring-session:4.0.0")