Reputation: 11
I have a spring boot 2 application with jdk8 that uses hazelcast to share https seesions which has been migrated to spring boot 3 with jdk17.
it configures a bean of HazelcastInstance and for session replication it has a webfilter which has as properties the instance name and the sticky session set to false as shown in the hazelcast site (https://docs.hazelcast.com/tutorials/springboot-webfilter-session-replication) The problem is that the hazelcast WebFilter uses internally javax.servlet.Filter which can't used with jdk17.
An ideas on how to solve this?
is it equivalent to use @EnableHazelcastHttpSession?
I've tried using @EnableHazelcastHttpSession, but not ssure if this will have the same behaviour
Upvotes: 0
Views: 948
Reputation: 702
You are looking at old documents. If you are using SpringBoot 3.1 follow this link
https://docs.spring.io/spring-session/reference/guides/java-hazelcast.html
You don't need to create any WebFilter
The sample for hazelcast is here
https://github.com/spring-projects/spring-session/tree/3.1.2/spring-session-samples/spring-session-sample-boot-hazelcast
Upvotes: 0