相关名词Reator,Mono,Publisher,Subscriber,Subscription
流程
- 请求用户数据requset1(user1)
- WebFlux的控制层收到请求,创建一个user类型的Publisher1
- WebFlux的处理层收到Publisher1,创建一个Subscriber1且创建Subscription1用于返回结果给requset1,进行订阅Publisher1.subscribe(Subscriber1)
- 5秒后Publisher1的user1从数据库取出完成,Subscriber1的Subscription1执行