Add this annotation to an
@Configuration class to expose the
SessionRepositoryFilter as a bean named "springSessionRepositoryFilter" and
backed by Redis. In order to leverage the annotation, a single
RedisConnectionFactory
must be provided. For example:
@Configuration
@EnableRedisHttpSession
public class RedisHttpSessionConfig {
@Bean
public JedisConnectionFactory connectionFactory() throws Exception {
return new JedisConnectionFactory();
}
}
More advanced configurations can extend
RedisHttpSessionConfiguration instead.