报告 “reactive” 方法中的 subscribe() 调用。

返回 Publisher 类型(包括 FluxMono)的方法不应直接调用 subscribe() 方法,因为它可以打破反应式调用链。

不要使用 subscribe(),而是考虑使用合成运算符,例如 flatMap()zip()then() > 等等。

示例:


  Flux<String> stringFlux(){
    Flux<String> flux = Flux.just("abc");
    flux.subscribe(); // <- 不适当的 `subscribe` 调用
    return flux;
  }