Let's have a look at the following steps:
- First off we need is a gateway (Chapter 5, Understanding API Gateway) and service registry and discovery (Chapter 6, Service Registry and Discovery) solution. We will leverage Zuul and Eureka from the Netflix OSS.
- First off we need a Eureka server, copy the source from Chapter-6/ eureka/eureka-server to a new folder or follow the steps from Chapter 6, Service Registry and Discovery, in the Eureka section to create a new server which would run on JVM.
- Doing nothing fancy, just add annotations @EnableEurekaServer and @SpringBootApplication at relevant places—DemoServiceDiscoveryApplication.java.
- Configure properties like port number, health check in the application.properties ...