January 2018
Intermediate to advanced
414 pages
10h 29m
English
Now that we have a working Discovery Server, we can use it to register our microservices; but first, we need to add the Eureka client, so let's edit pom.xml from our microservice to add as a dependency:
.....<dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> </dependency>.....</dependencies>
Now we can run our microservice, but remember that our Config Server and Discovery Server should be up and be running before we do that; from our microservice folder, we can just write:
mvnw spring-boot:run
In the log lines from our microservice, we should now see:
INFO 9092 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient ...
Read now
Unlock full access