org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionCache': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'stringRedisTemplate' defined in class path resource [org/springframework/boot/autoconfigure/data/redis/RedisAutoConfiguration.class]: Unsatisfied dependency expressed through method 'stringRedisTemplate' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redissonConnectionFactory' defined in class path resource [com/vrv/im/starter/redis/ServerRedisSpringBootAutoConfiguration.class]: Unsatisfied dependency expressed through method 'redissonConnectionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonClient' defined in class path resource [com/vrv/im/starter/redis/ServerRedisSpringBootAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Can't connect to servers!
时间: 2024-03-31 18:35:28 浏览: 174
org.springframework.web.jar
这个错误看起来是在创建一个名为'sessionCache'的bean时出现了问题,依赖注入失败了。更具体地说,是在创建名为'stringRedisTemplate'的bean时出现了问题,因为它需要'redissonConnectionFactory'这个bean,但是'redissonConnectionFactory'本身又需要'redissonClient'这个bean。最后,创建'redissonClient'这个bean时出现了错误,因为无法连接到Redis服务器。可能需要检查Redis服务器是否正常运行,并确保配置文件中指定的连接信息是正确的。
阅读全文