【发布时间】:2019-10-23 02:03:00
【问题描述】:
就Mono 而言,它们之间的主要区别是什么?
从文档中,我读到flatMap 是异步的,map 是同步的。但这对我来说真的没有意义 b/c Mono 都是关于并行性的,这一点是无法理解的。有人可以用更容易理解的方式改写它吗?
然后在flatMap 的文档中声明(https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html#flatMap-java.util.function.Function-):
Transform the item emitted by this Mono asynchronously, returning the
value emitted by another Mono (possibly changing the value type).
那里的另一个 Mono 是什么意思?
【问题讨论】:
标签: spring-webflux project-reactor