//map 操作符
Flux flux = Flux.just(1,2,3,4)
.log()
.map(i->{
System.out.println("first:"+i);
return i+1;
});
System.out.println(flux.subscribe(
System.out::println
));
//flapMap 操作符
Flux flux1 = Flux.just(1,2,3,4)
.log()
.flatMap(i->{
Flux flux2 = Flux.just(i);
System.out.println("first:"+i);
return flux2;
});
flux.subscribe(
System.out::println
);
慕码人2483693
交互式爱情