spring-securityspring-sessionspring-data-redis

Consider defining a bean of type 'org.springframework.data.redis.connection.RedisConnectionFactory' in your configuration


i try to use spring session and i dowload this project from git https://github.com/spring-guides/tut-spring-security-and-angular-js/tree/master/spring-session

and i get this error APPLICATION FAILED TO START


Description:

Parameter 0 of method sessionRedisTemplate in org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration required a bean of type 'org.springframework.data.redis.connection.RedisConnectionFactory' that could not be found.

Action:

Consider defining a bean of type 'org.springframework.data.redis.connection.RedisConnectionFactory' in your configuration.


Solution

  • The error is misleading. You are missing some dependencies.

    compile 'redis.clients:jedis'
    compile 'org.apache.commons:commons-pool2'