SpringBoot整合spring-boot-starter-data-redis时启动报错找不到redis.clients.jedis.JedisPoolConfig的类文件

异常信息如下:

Error:(22, 16) java: 无法访问redis.clients.jedis.JedisPoolConfig
  找不到redis.clients.jedis.JedisPoolConfig的类文件

原因:缺少jedis依赖

 
      redis.clients
      jedis
      2.10.2
      jar
      compile
 

引入上述依赖即可。

最终SpringBoot整合Redis模块的pom.xml文件如下:



    
        carnellj
        org.huawei
        1.0-SNAPSHOT
    
    4.0.0

    redis-cache

    
        
            org.springframework.boot
            spring-boot-starter-test
            test
        
        
            org.springframework.boot
            spring-boot-test
            test
        
        
            org.springframework.boot
            spring-boot-starter-data-redis
        
        
            redis.clients
            jedis
            2.10.2
            jar
            compile
        
        
            com.fasterxml.jackson.core
            jackson-annotations
        
        
            com.fasterxml.jackson.core
            jackson-core
        
        
            com.fasterxml.jackson.core
            jackson-databind
        
    

 

你可能感兴趣的:(Spring,Boot,异常记录,Redis,spring,boot,redis,java)