【发布时间】:2018-10-10 12:30:58
【问题描述】:
我想根据某些条件将一个通量的内容填充到另一个通量中。这是我的两个助焊剂:
Flux<templateVersionBo> templateVerion = templateVersionRepo.findAll();
Flux<templateBo> template = templateRepo.findAll();
templateVersion 包含模板的 id。我想将模板版本填充到模板变量中,例如模板“publishedVersion”并返回 templateBo 通量,如下所示:
if (templateVersion.getTemplateId().equals(template.getId()) {
templateBo.setTemplatePublishedVersion(version);
}
return templateBo;
我是响应式编程的新手。因此,即使不使用阻止/订阅,也不确定是否可能。
【问题讨论】:
标签: java reactive-programming spring-webflux