Setting up Zuul

Unlike the Eureka Server and the Config Server, in typical deployments, Zuul is specific to a microservice. However, there are deployments in which one API Gateway covers many microservices. In this case, we are going to add Zuul for each of our microservices--Search, Booking, Fare, and Check-In.

The full source code of this section is available under the chapter7.*-apigateway project in the code files.

Perform the following steps for setting up Zuul:

  1. Convert the microservices one by one. Start with the Search API Gateway. Create a new Spring Starter project and select Zuul, Config Client, Actuator, and Eureka Discovery:

The project structure for the search-apigateway is shown in this screenshot:

  1. The next step is to integrate ...

Get Building Microservices with Spring now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.