org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisController': Unsatisfied dependency expressed through field 'redisRepository'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisRepositoryImpl' defined in file [F:JavaWorkSpaceAlibaba2018AlibabaJavaSpringBoot2x10RedisDemotargetclassescomfrankxuleirepositoryRedisRepositoryImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisTemplate' defined in class path resource [com/frankxulei/config/RedisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.redis.core.RedisTemplate]: Factory method 'redisTemplate' threw exception; nested exception is 。。。
解决办法:
1、检查一下Redis服务器是否启动
2、检查一下Spring Boot的Redis配置参数Host、Port
3、Password等是否正确
重新启动就可以了
Java Spring Boot2.0 连接 Redis 出错:Unsatisfied dependency expressed th...
最新推荐文章于 2024-10-14 16:03:36 发布
本文解析了在SpringBoot项目中整合Redis时遇到的UnsatisfiedDependencyException异常,详细介绍了错误原因,包括Redis服务器未启动、配置参数错误等问题,并提供了检查及解决步骤。
1028

被折叠的 条评论
为什么被折叠?



