当前位置: 代码迷 >> 综合 >> springboot整合gradle和redis报错Could not resolve: org.springframework.boot:spring-boot-starter-data-redis
  详细解决方案

springboot整合gradle和redis报错Could not resolve: org.springframework.boot:spring-boot-starter-data-redis

热度:45   发布时间:2023-12-13 10:57:54.0

报这个错是因为gradle添加的依赖包找不到,最后发现添加依赖的方式不对

compile("org.springframework.boot:spring-boot-starter-data-redis")

之前是这样添加的,发现不对,和springboot的版本有关,改成下面的方式就对了

compile("org.springframework.boot:spring-boot-starter-data-redis:${springBootVersion}")

 

  相关解决方案