Fix ofResponseProcessor signature
This commit changes the `HandlerFilterFunction.ofResponseProcessor` method signature to return `Mono<ServerResponse>`, to better cooperate with response builders (which all return a `Mono`).
This commit is contained in:
parent
9e8bc95dd6
commit
d17b99fe37
|
@ -92,10 +92,10 @@ public interface HandlerFilterFunction<T extends ServerResponse, R extends Serve
|
|||
* @return the filter adaptation of the request processor
|
||||
*/
|
||||
static <T extends ServerResponse, R extends ServerResponse> HandlerFilterFunction<T, R> ofResponseProcessor(
|
||||
Function<T, R> responseProcessor) {
|
||||
Function<T, Mono<R>> responseProcessor) {
|
||||
|
||||
Assert.notNull(responseProcessor, "'responseProcessor' must not be null");
|
||||
return (request, next) -> next.handle(request).map(responseProcessor);
|
||||
return (request, next) -> next.handle(request).then(responseProcessor);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue