Let's say I need to map class Source to class Destination with an interface of the mapstruct.
@Mapper
public interface MyMapper {
@Mapping(target = "attribute1", source = "attribute1")
Destination toDestination(Source source);
}
If class Destination has two constructors, a compile error will occur:
"Ambiguous constructors found for creating Destination ..."
If the attribute1 of the Destination class doesn't have its setter, another compile error will occur:
"Unknown property"
So, how exactly does the mapper map class attributes?