Merge

public class Part05Merge {
    //========================================================================================

    // TODO Merge flux1 and flux2 values with interleave
    public Flux<User> mergeFluxWithInterleave(Flux<User> flux1, Flux<User> flux2) {
        return Flux.merge(flux1, flux2);
    }

//========================================================================================

    // TODO Merge flux1 and flux2 values with no interleave (flux1 values and then flux2 values)
    public Flux<User> mergeFluxWithNoInterleave(Flux<User> flux1, Flux<User> flux2) {
        return Flux.concat(flux1, flux2);
    }

//========================================================================================

    // TODO Create a Flux containing the value of mono1 then the value of mono2
    public Flux<User> createFluxFromMultipleMono(Mono<User> mono1, Mono<User> mono2) {
        return Flux.concat(mono1, mono2);
    }

}
posted @ 2025-11-11 16:42  bigroc  阅读(2)  评论(0)    收藏  举报