16 lines
364 B
Java
16 lines
364 B
Java
package com.baeldung.mapper;
|
|
|
|
import org.mapstruct.Mapper;
|
|
import org.mapstruct.Mapping;
|
|
|
|
import com.baeldung.dto.CustomerDto;
|
|
import com.baeldung.entity.Customer;
|
|
|
|
@Mapper
|
|
public interface CustomerDtoMapper {
|
|
|
|
@Mapping(source = "firstName", target = "forename")
|
|
@Mapping(source = "lastName", target = "surname")
|
|
CustomerDto from(Customer customer);
|
|
}
|