Using ModelMapper on different data types with same attribute name
问题 I have two classes say Animal & AnimalDto I want to use ModelMapper to convert Entity to DTO and vice verca. But the classes are supposed to have different data types for a few attributes having similar name. How do I achieve this? Animal.java public class Animal { int category; String color; int age; } AnimalDto.java public class AnimalDto { String category; int color; int age; } currently I'm manually transforming as such: class AnimalTransformer { private static Category[] categories =