This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Cloud Gateway 4.1.5! |
Glossary
-
Route: The basic building block of the gateway. It is defined by an ID, a destination URI, a collection of predicates, and a collection of filters. A route is matched if the aggregate predicate is true.
-
Predicate: This is a Spring WebMvc.fn
RequestPredicate
. The input type is a Spring WebMvc.fnServerRequest
. This lets you match on anything from the HTTP request, such as headers or parameters. -
Filter: These are instances of
HandlerFilterFunction
. Here, you can modify requests and responses before or after sending the downstream request. Filters may also implementFunction<ServerRequest, ServerRequest>
and adapted to aHandlerFilterFunction
byHandlerFilterFunction.ofRequestProcessor()
for 'before' filters. For 'after' filters,BiFunction<ServerRequest,T extends ServerResponse,R extends ServerResponse>
may be implemented and adapted byHandlerFilterFunction.ofResponseProcessor()
.