Flux 和 Mono 区别
原创转载请注明出处:https://www.cnblogs.com/agilestyle/p/15176531.html
Flux
an Asynchronous Sequence of 0-N Items
Flux<String> seq1 = Flux.just("foo", "bar", "foobar"); List<String> iterable = Arrays.asList("foo", "bar", "foobar"); Flux<String> seq2 = Flux.fromIterable(iterable); Flux<Integer> numbersFromFiveToSeven = Flux.range(5, 3);
Mono
an Asynchronous 0-1 Result
Mono<String> noData = Mono.empty();
Mono<String> data = Mono.just("foo");
Reference
https://projectreactor.io/docs/core/snapshot/reference/#core-features
欢迎点赞关注和收藏
强者自救 圣者渡人