Hi i need mappig variables to request. How can i mapp into List. My request looks like.
public class Request {
private String Id;
private List<Data> applicationData;
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class Data {
private String data1;
private String data2;
private String data3;
}
}
and my mapper
@Mapper(componentModel = "spring")
public abstract class RequestMapper {
@Mapping(target = "Id", source = "data.Id")
@Mapping(target = "data.???.data1", source = "data.data1")
@Mapping(target = "data.???.data2", source = "data.data2")
@Mapping(target = "applicationData.???.data3", source = "data.data3")
public abstract Request map(Data variables);
}