在基于Webflux注释的Controller中,每种返回类型的优缺点是什么?
关于性能,框架的开销,流媒体Cababilites等...
普通类型
@GetMapping
public Something method()
{
// ...
}
反应类型
@GetMapping
// public Flux<Something> method()
public Mono<Something> method()
{
// ...
}
具有响应类型的ResponseEntity
@GetMapping
public ResponseEntity<Mono<Something>> method()
{
// ...
}
具有ResponseEntity的反应类型
@GetMapping
public Mono<ResponseEntity<Something>> method()
{
// ...
}