【发布时间】:2021-11-24 19:38:29
【问题描述】:
class Item {
String oneTo
}
class Header {
String twoTo;
List <Item> items;
}
class HeaderFrom {
String oneFrom;
String twoFrom;
}
在上面的例子中,我需要使用 MapStruct 映射以下场景。完成这项工作的最佳方法是什么?
oneFrom -> all the oneTo fields in the list
twoFrom -> twoTo
谢谢。
【问题讨论】: