February 2019
Intermediate to advanced
442 pages
11h 46m
English
Let's first understand these components. They are defined as an interface in Spring WebFlux. The HandlerFunction interface looks as follows:
@FunctionalInterfacepublic interface HandlerFunction<T extends ServerResponse> { Mono<T> handle(ServerRequest request);}
This interface is similar to the Function<T,R> type, which takes the value (of the Ttype) and returns another value (of the Rtype). In this case, it is equivalent to Function<ServerRequest,Mono<T> . It is much like a servlet. The T type is the response type of the function that should implement the ServerReponse interface, which represents the server-side HTTP response.
The handle() method takes the ServerRequest object ...