【发布时间】:2018-07-23 18:48:27
【问题描述】:
尝试使用spring cloud gateway创建自己的api网关
下面是我的 build.gradle 文件,
buildscript {
ext {
springBootVersion = "1.5.9.RELEASE"
}
apply plugin: "io.spring.dependency-management"
apply plugin: "org.springframework.boot"
dependencies {
compile(
'org.springframework.boot:spring-boot-starter-web',
'org.springframework.boot:spring-boot-starter-tomcat',
'org.springframework.boot:spring-boot-starter-actuator',
'org.springframework.boot:spring-boot-starter-webflux',
'org.springframework.cloud:spring-cloud-starter-gateway',
'org.springframework.cloud:spring-cloud-starter-eureka'
)
testCompile(
'org.springframework.boot:spring-boot-starter-test',
'org.springframework.cloud:spring-cloud-starter-eureka-server'
)
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:Finchley.M5"
mavenBom 'org.springframework.cloud:spring-cloud-gateway:2.0.0.BUILD-SNAPSHOT'
}
}
当我尝试刷新 gradle 项目时,出现以下错误
0s配置成功 无法解决:org.springframework.cloud:spring-cloud-starter-eureka: 无法解析:org.springframework.cloud:spring-cloud-starter-eureka-server:
你能确认一下我的spring boot和cloud版本吗?
【问题讨论】: