php - spring + redis集群问题
PHP中文网
PHP中文网 2017-04-11 10:32:40
0
2
527

根据网上的教程用spring-data-redis整合,redis属性文件如下,
报错如下:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisDataSource': Unsatisfied dependency expressed through field 'shardedJedisPool'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'redis.clients.jedis.ShardedJedisPool' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588)
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1225)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:552)

很好奇我并没有使用ShardedJedisPool分片池,为毛还是回去创建注入,求解,都是根据教程来的

PHP中文网
PHP中文网

认证高级PHP讲师

全部回覆(2)
刘奇

idea的问题,编译的class文件没删除

Peter_Zhu

redis能在客户端访问吗?

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!