reactjs - 使用spring webclient时返回特定值时如何重试
问题描述
使用spring webclient时返回特定值时如何重试?我正在尝试使用 webclient 实现轮询方法。
public FooDto getFooDto(String token)
return webClient
.get()
.uri(uriBuilder -> uriBuilder
.path("/foo/{token}")
.build(token))
.retrieve()
.bodyToMono(FooDto.class)
.blockOptional()
.repeatWhen() // ?? or retryWhen
...
if (fooDto.getStatus().equals("processing")) {
// request again
}
...
.orElseThrow(() -> new RuntimeException(""));
解决方案
推荐阅读
- neo4j - 检查子图是否整体满足条件
- excel-formula - Excel/多边形挑战:如何在 Excel 中使用 x 和 Y 坐标创建扩展条形图
- c# - 使用 C# 相对于旋转矩形旋转矩形
- git - 谁能帮助我修复樱桃挑选 Git 错误?
- amazon-web-services - Amazon S3 域级隐私
- r - 嵌套 For 循环数据存储
- node.js - 如何在 Kubernetes Pod 中调试 nodeJS 应用程序?
- iccube - The purpose of NON_EMPTY_BEHAVIOR
- angular - 有没有办法在单个 @Input() 集合中设置多个属性?
- reactjs - 没有找到任务运行器配置?