How do you use Hazelcast as a http session store with embedded Tomcat with Spring Boot and Spring Security? I see there is a EmbeddedServletContainerCustomizer and SpringAwareWebFilter but I don't understand how to use it.
相关问题
- Dependency injection into Logback Appenders with S
- Deserialize duplicate keys to list using Jackson
- How can I access the repository from the entity in
- Prevent Swagger from automatically adding some mod
- Creating Unknown Number of Beans With Configuratio
相关文章
- How to load @Configuration classes from separate J
- Using Spring Dynamic Languages Support from Groovy
- Spring JMS : Set ErrorHandler for @JmsListener ann
- ModelMapper: Choose mapping based on Child class
- Configure Spring for CORS
- Remove transitive classpath dependency in gradle
- SpringBoot When file upload size limit exceeds get
- Can we add a feature module to an Angular app afte
As described in Hazelcast's documentation, you need to configure Hazelcast's
SpringAwareWebFilter
andSessionListener
. You can do so in Spring Boot by declaring aFilterRegistrationBean
and aServletListenerRegistrationBean
respectively:SpringAwareWebFilter
andSessionListener
are both in Hazelcast'shazelcast-wm
module so you'll need to add a dependency oncom.hazelcast:hazelcast-wm
to yourpom.xml
orbuild.gradle
.hazelcast-wm
also requires Spring Security to be on the classpath.Now, when you run your application, you should see log output from Hazelcast during startup that's similar to the following:
Why not uses Spring-session? It is pretty easy.
http://docs.spring.io/spring-session/docs/current/reference/html5/guides/boot.html