<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zuul</artifactId>
</dependency>
gateway with routing
@EnableZuulServer
is used
when you want to build your own routing service and not use any Zuul prebuilt
capabilities. An example of this would be if you wanted to use Zuul to
integrate with a service discovery engine other than Eureka (for example,
Consul). We’ll only use the @EnableZuulServer
annotation in this book.
The Zuul proxy server is designed by default to work on the Spring products. As such, Zuul will automatically use Eureka to look up services by their service IDs and then use Netflix Ribbon to do client-side load balancing of requests from within Zuul.