public class KeyValuePO {
private Integer key;
private String value;
private YNEnum ynEnum;
...
destination type:
public class KeyValueVO {
private Integer key;
private String value;
private YNEnum ynEnum;
...
converter code
public static <S, D> List<D> getDeeplyCopiedObject(List<S> source, Class<D> destinationType) {
Assert.notNull(source, "Source must not be null");
Assert.notNull(destinationType, "Destination Type Type must not be null");
MapperFactory mapperFactory = new DefaultMapperFactory.Builder().build();
mapperFactory.classMap(source.getClass(), destinationType).byDefault().register();
MapperFacade mapper = mapperFactory.getMapperFacade();
return mapper.mapAsList(source, destinationType);
}
enum:
source type:
destination type:
converter code
and the invoke code
then we get the error: