org.springframework.data.redis.connection.RedisConnectionFactory' that could not be found
Error creating bean with name 'redisTemplate' defined in class path resource
I got the error because I didn’t introduce the jedis dependency. Another reason is that the versions of the maven dependencies of jedis and spring-boot-starter-data-redis are incompatible, which is a common problem. The same is true if JedisConnectionFactory cannot be created.
You only need to introduce jedis dependency, to solve it
<!--redis缓存--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> <!--spring boot2.x以上版本需要引入,不然启动会报错!--> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> </dependency>
Start again
The above is the detailed content of What should I do if SpringBoot integrates redis and reports errors?. For more information, please follow other related articles on the PHP Chinese website!