The following diagram shows the overall architecture that we have created with the Config server, Eureka, Feign, Zuul, and Cloud Streams. The architecture also includes the high availability of all components. In this case, we assume that the client uses the Eureka client libraries:
The summary of the projects and the port they are listening on is given in the following table:
Microservice |
Projects |
Port |
---|---|---|
Book microservice |
|
|
Check-in microservice |
|
|
Fare microservice |
|
|
Search microservice |
|
|
Website client |
|
|
Spring Cloud Config server |
|
|
Spring Cloud Eureka server |
|
|
Book API gateway |
|
|
Check-in API gateway |
|
|
Fares API gateway |
|
|
Search API gateway |
|
|
Follow these steps to do a final run:
pom.xml
at the root level:mvn –Dmaven.test.skip=true clean install
java -jar target/fares-1.0.jar java -jar target/search-1.0.jar java -jar target/checkin-1.0.jar java -jar target/book-1.0.jar java –jar target/fares-apigateway-1.0.jar java –jar target/search-apigateway-1.0.jar java –jar target/checkin-apigateway-1.0.jar java –jar target/book-apigateway-1.0.jar java -jar target/website-1.0.jar
http://localhost:8001
. Follow the steps mentioned in the Running and testing the project section in Chapter 4, Microservices Evolution – A Case Study.