如果响应主体对象具有特殊状态,如何调用返回Mono的方法?

问题描述

我有一些webclient方法,例如:

public Mono<MyReport> getReport(String target) {
        return client
                .method(HttpMethod.GET)
                .uri(uriBuilder -> uriBuilder
                        .path("/report/{target}")
                        .build(target)
                )
                .retrieve()
                .bodyToMono(MyReport.class);
    }

我在商务服务中称这种方法

reportService.getReport("id").toFuture();

如果响应正文(MyReport)MyReport.getStatus()。equals(“ NOT_READY”),如何在Mono链中重复调用方法

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)