考虑在配置中定义类型为'org.springframework.data.redis.connection.RedisConnectionFactory'的bean

Hou*_*sem 1 spring-security spring-data-redis spring-session

我尝试使用spring session并从git https://github.com/spring-guides/tut-spring-security-and-angular-js/tree/master/spring-session下载此项目

我收到此错误应用程序未能启动


描述:

org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration中方法sessionRedisTemplate的参数0需要一个无法找到的类型为'org.springframework.data.redis.connection.RedisConnectionFactory'的bean.

行动:

考虑在配置中定义类型为'org.springframework.data.redis.connection.RedisConnectionFactory'的bean.

小智 5

该错误具有误导性.你缺少一些依赖项.

compile 'redis.clients:jedis'
compile 'org.apache.commons:commons-pool2'
Run Code Online (Sandbox Code Playgroud)