【发布时间】:2021-12-11 14:18:22
【问题描述】:
假设我有以下映射目标。
class Some {
private List<Other> others;
}
如何从Others 的Iterable 映射到others 属性?
我可以这样做吗?
@Mapper
interface SomeMapper {
// map source to target.others
Some mapOthers(Iterable<? extends Other> source, @MappingTarget Some target);
}
【问题讨论】:
标签: mapstruct