Files
spring-soap/mapstruct/src/main/java/com/baeldung/mapper/CustomerDtoMapper.java
Michael Sievers 0e904f738a [BAEL-3077] Add examples for mapstruct with multiple source objects (#7724)
* [BAEL-3077] Add examples for mapstruct with multiple source objects

* [BAEL-3077] Add unit tests for mappers added by examples
2019-09-06 12:03:49 -07:00

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);
}