|
|
|
@ -505,6 +505,8 @@ The example shown above also uses two request predicates, as the builder uses |
|
|
|
Router functions are evaluated in order: if the first route does not match, the |
|
|
|
Router functions are evaluated in order: if the first route does not match, the |
|
|
|
second is evaluated, and so on. |
|
|
|
second is evaluated, and so on. |
|
|
|
Therefore, it makes sense to declare more specific routes before general ones. |
|
|
|
Therefore, it makes sense to declare more specific routes before general ones. |
|
|
|
|
|
|
|
This is also important when registering router functions as Spring beans, as will |
|
|
|
|
|
|
|
be described later. |
|
|
|
Note that this behavior is different from the annotation-based programming model, where the |
|
|
|
Note that this behavior is different from the annotation-based programming model, where the |
|
|
|
"most specific" controller method is picked automatically. |
|
|
|
"most specific" controller method is picked automatically. |
|
|
|
|
|
|
|
|
|
|
|
@ -656,8 +658,8 @@ components required to process requests. The WebFlux Java configuration declares |
|
|
|
infrastructure components to support functional endpoints: |
|
|
|
infrastructure components to support functional endpoints: |
|
|
|
|
|
|
|
|
|
|
|
* `RouterFunctionMapping`: Detects one or more `RouterFunction<?>` beans in the Spring |
|
|
|
* `RouterFunctionMapping`: Detects one or more `RouterFunction<?>` beans in the Spring |
|
|
|
configuration, combines them through `RouterFunction.andOther`, and routes requests to the |
|
|
|
configuration, <<core.adoc#beans-factory-ordered, orders them>>, combines them through |
|
|
|
resulting composed `RouterFunction`. |
|
|
|
`RouterFunction.andOther`, and routes requests to the resulting composed `RouterFunction`. |
|
|
|
* `HandlerFunctionAdapter`: Simple adapter that lets `DispatcherHandler` invoke |
|
|
|
* `HandlerFunctionAdapter`: Simple adapter that lets `DispatcherHandler` invoke |
|
|
|
a `HandlerFunction` that was mapped to a request. |
|
|
|
a `HandlerFunction` that was mapped to a request. |
|
|
|
* `ServerResponseResultHandler`: Handles the result from the invocation of a |
|
|
|
* `ServerResponseResultHandler`: Handles the result from the invocation of a |
|
|
|
|