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

根据网上的教程用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讲师

répondre à tous(2)
刘奇

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

Peter_Zhu

redis能在客户端访问吗?

Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!