I am pretty new in reactive programming, I am using last Spring 5 Webflux framework and playing with so project reactor. I am facing an issue, I would like to use Mono with this inheritance schema :
Client extends User
I created this method :
public Mono<User> saveUser(Mono<User> userToSave)
{
return userToSave.doOnNext(u -> {
// Some stuff
});
}
I cannot now use this method with a Mono< Client > as parameter in spite of Client extends from User.
Mono<Client> client = ...
instance.saveUser(client); <-- Error
How can I achieve this ? Do I try something bad ?
Thank you a lot