Configuring Filter to replacing HttpSession with Spring Session

The following configuration creates a Servlet Filter to replace HTTPSession with a Session implementation from Spring Session--Redis Data Store in this example:

    @EnableRedisHttpSession     public class ApplicationConfiguration {      @Bean       public LettuceConnectionFactory connectionFactory() {        return new LettuceConnectionFactory();       }    }

Get Mastering Spring 5.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.