#java##reactor##flatMap#
视频讲解: https://www.bilibili.com/video/av79582009/
FluxMonoTestCase.java
package com.example.reactor;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import reactor.core.publisher.Flux;
@Slf4j
public class FluxMonoTestCase extends BaseTestCase {
@Test
public void flatMap(){
Flux<String> stringFlux1 = Flux.just("a","b","c","d","e","f","g","h","i");
//嵌套Flux
Flux<Flux<String>> stringFlux2 = stringFlux1.window(2);
stringFlux2.flatMap(flux1 ->flux1.map(word ->word.toUpperCase()))
.subscribe(System.out::println);
//从嵌套Flux还原字符串Flux
Flux<String> stringFlux3 = stringFlux2.flatMap(flux1 ->flux1);
//