I am using Spring Webflux, and I need to return the ID of user upon successful save.
Repository is returning the Mono
Mono<User> savedUserMono = repository.save(user);
But from controller, I need to return the user ID which is in object returned from save() call.
I have tried using doOn*, and subscribe(), but when I use return from subscribe, there is an error 'Unexpected return value'