spring boot启动报Error creating bean with name 'redisUtil'/'redisTemplate'

具体报错信息:

org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'redisUtil': Injection of resource dependencies failed; 
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: 
Error creating bean with name 'redisTemplate' defined in class path resource 
[org/springframework/boot/autoconfigure/data/redis/RedisAutoConfiguration.class]: 
Unsatisfied dependency expressed through method 'redisTemplate' parameter 0; 

nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: 

Error creating bean with name 'redisConnectionFactory' defined in class path resource 
[org/springframework/boot/autoconfigure/data/redis/LettuceConnectionConfiguration.class]: 
Unsatisfied dependency expressed through method 'redisConnectionFactory' parameter 0; 
nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'lettuceClientResources' defined in class path resource [
org/springframework/boot/autoconfigure/data/redis/LettuceConnectionConfiguration.class]:
 Bean instantiation via factory method failed; nested exception is org.springframework.be
 ans.BeanInstantiationException: Failed to instantiate [io.lettuce.core.resource.DefaultClientResources]: 
 Factory method 'lettuceClientResources' threw exception; 
 
 nested exception is java.lang.NoClassDefFoundError: reactor/core/scheduler/Schedulers
 

找了好久

原因:redis中的传递依赖,没有依赖进来,也就是本地maven仓库里没有这个版本的jar包。

这两个包版本没有依赖进来。

 

解决:先把本地maven中的相应包删除,重新更新项目依赖。

你可能感兴趣的:(bos错误合集)