2

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.

3 Answers 3

6

The error is misleading. You are missing some dependencies.

compile 'redis.clients:jedis'
compile 'org.apache.commons:commons-pool2'
Sign up to request clarification or add additional context in comments.

Comments

3

In case somebody is facing an issue with springboot, might be following dependency in pom.xml is missing

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>

This missing dependency was misleading me to the error in the question.

Comments

0

For me, this issue occurred due to a dependency update of Spring Boot. I solved it by opening my application.properties and replacing every spring.redis with spring.data.redis.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.