Gateway for microservices

Let's get back to our example microservice-based system. We have already discussed this example in the section on API gateway configuration based on Spring Cloud Netflix Zuul. We would like to prepare the same static route definition as was already prepared for the application based on a Zuul proxy. Each service would then be available under the gateway address and specific path, for example, http://localhost:8080/account/**. The most suitable way to declare such a configuration with Spring Cloud Gateway is through Path Route Predicate Factory and RewritePath GatewayFilter Factory. A rewrite path mechanism changes the request path by taking part of it or adding some pattern. In our case, every incoming request path ...

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.