Mapstruct – How can I inject a spring dependency in the Generated Mapper class

As commented by brettanomyces, the service won’t be injected if it is not used in mapping operations other than expressions. The only way I found to this is : Transform my mapper interface into an abstract class Inject the service in the abstract class Make it protected so the “implementation” of the abstract class has … Read more