尝试使用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项目,得到以下错误
配置为0成功 无法解决:org.springframework.cloud:spring-cloud-starter-eureka: 无法解决:org.springframework.cloud:spring-cloud-starter-eureka-server:
请问您确认我的春季启动和云版本吗?
答案 0 :(得分:6)
他们在Edgware中重命名。这一个是spring-cloud-starter-netflix-eureka-client。另一个是spring-cloud-starter-netflix-eureka-server。