17 lines
484 B
Java
17 lines
484 B
Java
package ru.soune.nocopy.mapper;
|
|
|
|
import org.mapstruct.Mapper;
|
|
import org.mapstruct.NullValuePropertyMappingStrategy;
|
|
import org.mapstruct.factory.Mappers;
|
|
import ru.soune.nocopy.dto.user.UserDTO;
|
|
import ru.soune.nocopy.entity.user.User;
|
|
|
|
@Mapper(componentModel = "spring",
|
|
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
|
|
public interface UserMapper {
|
|
|
|
UserMapper INSTANCE = Mappers.getMapper(UserMapper.class);
|
|
|
|
UserDTO toDTO(User user);
|
|
}
|