我是 mapstruct 的新手,我使用 spring 作为 DI 我跟进有关 DI 容器的 MapStruct 文档页面第 4.2 节我尝试将我的实体映射到 dto,如下所示:
@Mapper(componentModel = "spring")
public interface CustomerMapper {
@Mapping(source = "registered",target = "activeProfile")
CustomerDto customerToCustomerDto(Customer customer);
}
当我运行 mvn install 我得到这个错误:
java:27: error: No property named "registered" exists in source parameter(s).
@Mapping(source = "registered",target = "activeProfile")
我的实体使用龙目岛,我确信有注册字段
请帮忙