ModelMapper, mapping list of Entites to List of DTO objects
You can create util class: public class ObjectMapperUtils { private static final ModelMapper modelMapper; /** * Model mapper property setting are specified in the following block. * Default property matching strategy is set to Strict see {@link MatchingStrategies} * Custom mappings are added using {@link ModelMapper#addMappings(PropertyMap)} */ static { modelMapper = new ModelMapper(); modelMapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT); } … Read more