我是 MapStruct 的新手,目前正在做 POC。我可以看到MapStruct能够从通用方法的接口生成实现类
Set<String> integerSetToStringSet(Set<Integer> integers);
Run Code Online (Sandbox Code Playgroud)
但是当我使用项目特定的类时,它给了我编译错误 <InterfaceName>impl is not abstract and does not override the abstract method <customMethod>.
我只使用一种方法的接口。接口有注解,@Mapper但方法是简单的one-to-one映射,不需要@Mapping注解。
如前所述,如果我放置一个通用方法,则一切正常,但不适用于特定于项目的类。
有人可以就这个问题给我一些指示吗?