private String id; private String name; } public interface ReservationRepository extends ReactiveCrudRepository<Reservation, String> { } @Component @RequiredArgsConstructor @Slf4j public class DataInitializer { private final ReservationRepository reservationRepository; @EventListener(ApplicationReadyEvent.class) public void ready() { Flux<Reservation> saved = Flux.just("AAA", "BBB", "CCC") .map(name -> new Reservation(null, name)) .flatMap(reservationRepository::save); reservationRepository.deleteAll() .thenMany(saved) .thenMany(reservationRepository.findAll()) .subscribe(reservation -> log.info("{}", reservation)); } }