我正在开发spring boot应用程序,我有两个类,分别是A和B。@Data int id;} @Data int bId;} 我需要映射一个类B的字段,它是使用mapstruct的a如何将源类A映射到目标字段a以及类B。示例映射器如下所示 @Mapping(source="id", target="bId")
B fromClassA(A a);
我希望在生成的类(由mapstruct生成)中禁用@Generate注释。在mapstruct的源代码中,我找到了类GeneratedType,它在构造函数中声明了一个字段generatedTypeAvailable,这对模板GeneratedType.ftl有影响。generatedTypeAvailable>/*</#if> value = "org.mapstruct.ap.MappingProcessor"&