ARTICLE AD BOX
I migrated my Spring Boot version from 3.5.0 to 4.0.2. Previously, in 3.5.0 Redis session management was working fine.
Now, in version 4.0.2, after a lot of trial and error, I found that when @EnableRedisHttpSession is explicitly specified, it works properly. I have searched the Spring Boot repo and documentation, but I couldn't find any mention about this change.
Any help in understanding this would be appreciated. Thanks!
For people who are struggling to find a fix, please include this class to your project.
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession; @Configuration(proxyBeanMethods = false) @EnableRedisHttpSession public class RedisHttpSessionConfig { @Bean public LettuceConnectionFactory redisConnectionFactory() { return new LettuceConnectionFactory(); } }