@Retention(value=RUNTIME) @Target(value=TYPE) @Documented @Import(value=HazelcastHttpSessionConfiguration.class) @Configuration public @interface EnableHazelcastHttpSession
@Configuration class to expose the
SessionRepositoryFilter as a bean named "springSessionRepositoryFilter" and
backed by Hazelcast. In order to leverage the annotation, a single HazelcastInstance
must be provided. For example:
@Configuration
@EnableHazelcastHttpSession
public class HazelcastHttpSessionConfig {
@Bean
public HazelcastInstance embeddedHazelcast() {
Config hazelcastConfig = new Config();
return Hazelcast.newHazelcastInstance(hazelcastConfig);
}
}
More advanced configurations can extend HazelcastHttpSessionConfiguration instead.EnableSpringHttpSession| Modifier and Type | Optional Element and Description |
|---|---|
int |
maxInactiveIntervalInSeconds
This is the session timeout in seconds.
|
String |
sessionMapName
This is the name of the Map that will be used in Hazelcast to store the session data.
|
public abstract int maxInactiveIntervalInSeconds
public abstract String sessionMapName