java Mapstruct:@InheritationInverseConfiguration>没有合适的结果类型构造函数用于反转此方法
我尝试使用mapstruct功能@InheritationInverseConfiguration。但它给了我以下错误:没有合适的结果类型构造函数来反转此方法。 但是生成的Impl看起来相当不错
@Mapper(uses = {
BOIdMapper.class,
DateMapper.class,
CarVOFactory.class,
})
public interface CarMapper {
CarMapper INSTANCE = Mappers.getMapper(CarMapper .class);
@Mappings({
@Mapping(source = "VOKey", target = "id"),
@Mapping(source = "gueltAb", target = "gueltigAb")
})
Car map(CarVO carVO);
@InheritInverseConfiguration
CarVO map(Car car);
public class CarVOFactory {
public CarVO createCarVO() {
return VOFactory.createVO(CarVO.class);
}
}
}
这是波乔的车
public class Car {
private String id;
private LocalDate gueltigAb;
...
}
这是另一种车型:
public interface CarVO extends ... {
void setVOKey (VOKey<CAR> voKey);
}
共 (0) 个答案