The Eureka starter project needs to be added as a dependency in the pom.xml file of the service consumer microservice:
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-eureka</artifactId> </dependency>
Currently, the URLs of the different instances of Microservice A are hardcoded in the service consumer microservice, as shown here, in application.properties:
microservice-a.ribbon.listOfServers= http://localhost:8080,http://localhost:8081
However, now we would not want to hardcode Microservice A URLs. We would want the service consumer microservice to get the URLs from Eureka Server. We do that by configuring the URL of Eureka Server in the ...