The gateway pattern allows you to define a single-entry point to the entire microservices architecture. The gateway will route all incoming requests from users to the specific backend service and can perform additional operations like validation or authentication.
For this implementation we will use Netflix Zuul. To do this, I created another application call API-gatewayeway’ that registers to eureka service discovery and has the spring cloud Netflix Zuul starter in the maven pom.
https://www.geeksforgeeks.org/java-spring-boot-microservices-sample-project/