Update Mono.then(Supplier) deprecated calls
Reactor Core has now deprecated the `Mono.then(Supplier)`. This is now replaced with `Mono.then(Mono.defer(Supplier))`.
This commit is contained in:
@@ -263,7 +263,7 @@ public abstract class AbstractHandlerMethodMapping<T> extends AbstractHandlerMap
|
||||
try {
|
||||
// Ensure form data is parsed for "params" conditions...
|
||||
return exchange.getRequestParams()
|
||||
.then(() -> {
|
||||
.then(Mono.defer(() -> {
|
||||
HandlerMethod handlerMethod = null;
|
||||
try {
|
||||
handlerMethod = lookupHandlerMethod(lookupPath, exchange);
|
||||
@@ -283,7 +283,7 @@ public abstract class AbstractHandlerMethodMapping<T> extends AbstractHandlerMap
|
||||
handlerMethod = handlerMethod.createWithResolvedBean();
|
||||
}
|
||||
return Mono.justOrEmpty(handlerMethod);
|
||||
});
|
||||
}));
|
||||
}
|
||||
finally {
|
||||
this.mappingRegistry.releaseReadLock();
|
||||
|
||||
@@ -186,10 +186,10 @@ public class RequestMappingHandlerAdapter implements HandlerAdapter, Application
|
||||
|
||||
return this.modelInitializer
|
||||
.initModel(bindingContext, modelAttributeMethods, exchange)
|
||||
.then(() -> this.methodResolver.getRequestMappingMethod(handlerMethod)
|
||||
.then(Mono.defer(() -> this.methodResolver.getRequestMappingMethod(handlerMethod)
|
||||
.invoke(exchange, bindingContext)
|
||||
.doOnNext(result -> result.setExceptionHandler(exceptionHandler))
|
||||
.onErrorResume(exceptionHandler));
|
||||
.onErrorResume(exceptionHandler)));
|
||||
}
|
||||
|
||||
private Mono<HandlerResult> handleException(Throwable ex, HandlerMethod handlerMethod,
|
||||
|
||||
Reference in New Issue
Block a user