I have some trouble with MapStruct using abstract class. I have 2 mappers:
MapperA extends AbstractMapper<U,V>
MapperB extends AbstractMapper<U,V>
MapperA uses MapperB
I have a method in AbstractMapper
public <T extends AbstractReference> T resolveReference(String id, @TargetType Class<T> entityClass) {
// Some implementation
}
While clean install, i got the ambiguous method error.
It seems that Mapstruct find the method twice, one frome each Mapper that extends the same class.
I did some search on the qualifier thing but it seems usefull when using different methods with the same signature. But in my case, it's the same one!!
If you have any ints.
Thanks
Edit:
@Mapper(componentModel = "cdi", uses = {MapperB.class})
@ApplicationScoped
public abstract class MapperA extends AbstractMapper<U1,V1> {}
MapperB does not use any other mapper.
@Mapper(componentModel = "cdi")
@ApplicationScoped
public abstract class MapperB extends AbstractMapper<U2,V2> {}