I was playing around with reactor
public @NotNull Mono<ServerResponse> findXXXXSse(final ServerRequest request) {
return request.bodyToMono(XXXXSearch.class)
.doOnNext(this::validate)
.flatMap(this::findXXXXSse)
.switchIfEmpty(this.emptyBodyException());
}
Adn I was wondering if the use of ".doOnNext(this::validate)" was correct or not. From my pint of view, I'm not sure the validate is called before the findXXXXSse ?
Am I wrong ?
question from:https://stackoverflow.com/questions/65885933/spring-reactor-doonnext-is-it-getting-executed