zoukankan      html  css  js  c++  java
  • Parameter 0 of method redisTemplate in org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration required a bean of type 'org.springframework.data.redis.connection.RedisConnectionFactor

    Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
    2019-07-16 14:55:18.498 ERROR 8880 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 
    
    ***************************
    APPLICATION FAILED TO START
    ***************************
    
    Description:
    
    Parameter 0 of method redisTemplate in org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration required a bean of type 'org.springframework.data.redis.connection.RedisConnectionFactory' that could not be found.
    
    The injection point has the following annotations:
        - @org.springframework.beans.factory.annotation.Autowired(required=true)
    
    The following candidates were found but could not be injected:
        - Bean method 'redisConnectionFactory' in 'JedisConnectionConfiguration' not loaded because @ConditionalOnClass did not find required classes 'org.apache.commons.pool2.impl.GenericObjectPool', 'redis.clients.jedis.Jedis'
        - Bean method 'redisConnectionFactory' in 'LettuceConnectionConfiguration' not loaded because @ConditionalOnClass did not find required class 'io.lettuce.core.RedisClient'
    
    
    Action:
    
    Consider revisiting the entries above or defining a bean of type 'org.springframework.data.redis.connection.RedisConnectionFactory' in your configuration.

    我在使用这个redis的时候,因为引入错误的依赖,所以导致出现上述的报错.将依赖引入正确以后,所有东西正常运行

    <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-redis</artifactId>
                <version>1.4.0.RELEASE</version>
            </dependency>
  • 相关阅读:
    PAT 1005. 继续(3n+1)猜想 (25)
    PAT 1004. 成绩排名 (20)
    android小游戏 飞机躲子弹
    PAT 1004. 成绩排名 (20) JAVA
    PAT 1003. 我要通过!(20) JAVA
    PAT 1003. 我要通过!(20)
    PAT 1002. 写出这个数 (20)
    NEERC, Northern Subregional Contest 2012 B 乱搞or搜索
    SGU 167 未解 dp
    Bucharest, Romania 2013 A Russian Dolls 贪心
  • 原文地址:https://www.cnblogs.com/qingmuchuanqi48/p/11194979.html
Copyright © 2011-2022 走看看