📜  地图列表的 mapstruct 光束映射 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:09.606000             🧑  作者: Mango

代码示例1
@Mapper
public interface MyMapper {

    @Mapping(target = "targetId", source = "sourceId")
    @Mapping(target = "subjectName", source = "course.courseName")
    @Mapping(target = "members", source = "course.students")
    Target map(Source source);

    @Mapping(target = "memberName", source = "studentName")
    Member toMember(Student student);
}