【发布时间】:2020-03-09 16:00:43
【问题描述】:
Repository repo
Repository otherRepo
foreach entity : repo.FindAll() {
entityFind = otherRepo.FindById(entity.Prop)
if (entityFind != null) {
return entityFind
}
}
如何使用 spring 反应式做到这一点?
我可以使用 blockFirst() 在 otherRepo 中搜索,但它会破坏反应链
我也尝试过使用 handle() 来控制流程,但是当我找到一个项目时我不会中断流程
有什么想法吗? 谢谢
【问题讨论】:
标签: spring project-reactor reactive