Im trying to use mapstruct to convert a DTO to my class representation.
The class looks something like follows:
public class Loan{
private Amount total;
private Amount paid;
}
public class Amount{
private Long amount;
private String currency;
}
The DTO class would be something like:
public class LoanDTO{
private Long paidAmount;
private Long totalAmount;
private String currency;
}
My mapper function would be something like this but I am unsure how I can get 'Amount' mapped properly.
@Mapper
public interface ResposeMap {
Loan toLoan(LoanDTO loanDTO);
}