I have the following method:
void save(User user);
And I call this method in this function:
userRepository.findById(id)
.flatMap(user -> {
userRepository.save(user);
return Mono.just(userMapper.map(user));
});
Is there a way that I can call the save method without the need to use a flatMap?
I tried the then but it does not accept lambdas?
Any other option?
Thanks