MapStruct is a code generator that generates bean mapper classes automatically.
MapStruct also has the ability to convert between different data types.
xxxxxxxxxx
@Mapper
public interface MapStructConverter extends Converter {
MapStructConverter MAPPER = Mappers.getMapper(MapStructConverter.class);
@Mapping(source = "status", target = "orderStatus")
@Override
Order convert(SourceOrder sourceOrder);
@Override
DestinationCode convert(SourceCode sourceCode);
}
https://www.baeldung.com/java-performance-mapping-frameworks