Ignoring registered services

Spring Cloud Zuul by default exposes all the services registered in Eureka server. If you would like to skip the automatic addition of every service, you have to set the zuul.ignored-services property with a pattern matched to all the ignored service names from a discovery server. How does it work in practice? Even if you do not provide any configuration with zuul.routes.* properties, Zuul would fetch the list of services from Eureka and automatically bind them to the path with the service name. For example, account-service would be available under the gateway address http://localhost:8080/account-service/**. Now, if you set the following configuration in  your application.yml file, it would ignore account-service ...

Get Mastering Spring Cloud 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.