Załóżmy, że mam metodę:
public Mono<?> registration(@RequestBody RegistrationRequest registrationRequest){
Mono<User> register = registrationService.register(registrationRequest);
return register;
}
Jak teraz zalogować do konsoli info, że user został zapisany ? Próbowałem coś takiego:
register.subscribe(v -> logger.info("Saved: " + v.toString()));
Ale nic się nie dzieje. block() na register też wywołać nie mogę, bo leci java.lang.IllegalStateException: block()/blockFirst()/blockLast() are blocking, which is not supported in thread reactor-http-nio-2
. Proszę o pomoc.