Trying to create my own api gateway using spring cloud gateway
Below is my build.gradle file,
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'
}
}
Whwn I am trying to do refresh gradle project, getting below error
CONFIGURE SUCCESSFUL in 0s Could not resolve: org.springframework.cloud:spring-cloud-starter-eureka: Could not resolve: org.springframework.cloud:spring-cloud-starter-eureka-server:
Can you please confirm my spring boot and cloud version?
You should let the eureka client continue to send heartbeat so that the whole system would be resume after the eureka server is back. If eureka client stops to send heartbeat, how does it know the server is resumed or not?
After downloading the project in main Spring Boot Application class file, we need to add @EnableEurekaServer annotation. The @EnableEurekaServer annotation is used to make your Spring Boot application acts as a Eureka Server. Make sure Spring cloud Eureka server dependency is added in your build configuration file.
Test the Application The eureka-client will take about a minute to register itself in the registry and to refresh its own list of registered instances from the registry. Visit the eureka-client in the browser, at http://localhost:8080/service-instances/a-bootiful-client .
They were renamed in Edgware. This one to spring-cloud-starter-netflix-eureka-client. The other to spring-cloud-starter-netflix-eureka-server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With