0

Find a particular record and update

studentRepository.findByStudid(studId).log().map(existingStud -> {
                                            return studentRepository.save(existingStud); // This return Mono defer ??
                                        }).subscribe(System.out::println);
KingGraySkull
  • 41
  • 1
  • 5

1 Answers1

0

You should use .flatMap instead of .map operator. It will subscribe to the inner Mono returned from save.

See map vs flatMap in reactor

bsideup
  • 2,845
  • 17
  • 21