小编Cha*_*ang的帖子

ResponseEntity<Mono> 和 Mono<ResponseEntity> 作为休息控制器的返回类型有什么区别

在 Spring Webflux 中, ResponseEntity<Mono> 与 Mono<ResponseEntity> 作为休息控制器的返回类型有什么区别?

什么时候最合适?

跟进这个问题,假设我需要返回一个列表,或者假设 Foo 的几个元素,有很多返回 Flux 的例子。返回 ResponseEntity<Flux> 或 Flux<ResponseEntity> 是否有意义?

当我在寻找这个问题时,我发现这里发布了同样的问题:https : //github.com/spring-projects/spring-framework/issues/22614,但没有答案,我搜索了 spring 文档,但没有找到任何信息.

谢谢您的帮助。

mono spring response flux spring-webflux

13
推荐指数
2
解决办法
1473
查看次数

标签 统计

flux ×1

mono ×1

response ×1

spring ×1

spring-webflux ×1