完整future< list< carditem>>到单一对象
我有一个API,可以返回
CardItem { CardType 卡片 卡尾 }
但是,我想迭代完整的future,并建立一个父子对象类,如果cardType = header是父。其余的卡片人是孩子。
就像
carditemro的单声道{ CardType =标题 卡片 卡尾 列表 }
i have an api that returns CompletableFuture
where CardItem{
cardType
cardStatus
cardDetails
}
but i'd like to iterate through the CompletableFuture and build a parent children object class where if cardType = Header is the parent. and the rest of the CardItems are children.
like Mono
where CardItemRO {
cardType= header
cardStatus
cardDetails
List
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将完整的名单列表列表到单声道列表。然后使用磁通。
You have map the list of completableFuture to List of Mono. then use Flux.fromIterable to iterate the list of Mono's