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

根据网上的教程用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 학습자의 빠른 성장을 도와주세요!