Questions Management – Support Edge Server – Implement API Gateway using Zuul Proxy of Spring Cloud Netflix

Check out the full series of Questions Management tutorial here.

After creating a support-edge-server project, now is the time to go into the API Gateway implementation using the Zuul Proxy of Spring Cloud Netflix for Questions Management application.

As I introduced Zuul Proxy in this tutorial, first, what we need to do is add @EnableZuulProxy annotation to the SupportEdgeServerApplication class as follows:

Next, we will register the API Gateway with Eureka Server by configuring in the application.properties file as follows:

Our Questions Management application has 3 services that will interact directly with the outside, currently is API Question Service, API Category Service, API Option Service. Now we will declare these services in the API Gateway with Zuul Proxy as follows:

Here, I have configured all services with the URL request to start with “/qm” and we will keep the prefix path that we have declared. You can read more this tutorial to understand the above configurations! Here we have completed the construction of API Gateway already!

Add Comment