【Springboot】spring-boot-starter-redis包报错 :unknown

springboot集成redis时,引入spring-boot-starter-redis包报错,maven找不到这个资源.如下图:

我的项目中,spring boot是 用的2.0.4版本.spring-boot-starter-redis在springboot 1.4.7版本后,改为了spring-boot-starter-data-redis,

所以如果想集成redis,应该引用spring-boot-starter-data-redis.

如果就是想用前者,那么就应该加上版本号.

 
      

 <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-redis</artifactId>
        <version>1.4.7.RELEASE</version>
 </dependency>

猜你喜欢

转载自www.cnblogs.com/zouhong/p/12079532.html
今日推荐