I am new in mapstruct and I am using spring as DI I follow up MapStruct documentation page regarding DI containers section 4.2 I tried to map my entity to dto as below :
@Mapper(componentModel = "spring")
public interface CustomerMapper {
@Mapping(source = "registered",target = "activeProfile")
CustomerDto customerToCustomerDto(Customer customer);
}
when i run mvn install i got this error :
java:27: error: No property named "registered" exists in source parameter(s).
@Mapping(source = "registered",target = "activeProfile")
my entity using lombok and I am sure there is registered field
please help
I removed lombok
from Entity and created setters /getters manually and worked well
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments