package com.pollex.pam.service.mapper; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import com.pollex.pam.domain.Customer; import com.pollex.pam.service.dto.CustomerRegisterDTO; @Service public class CustomerDTOMapper { public Customer toCustomer(CustomerRegisterDTO source) { Customer target = new Customer(); BeanUtils.copyProperties(source, target); return target; } }