Hi,
I am using with Spring Component Model and when i created a new Decorator using the approach described in the reference document. When i try to use the mapping after introducing the Decorator change, i am getting NPE when the mapper method is being invoked from the delegate instance in the Mapstruct generated code.
Not sure if the spring DI is not working or if i am missing any steps.
Here are the annotations i have in Decorator code:
public abstract class PolicyWebServiceMapStructMapperDecorator implements PolicyWebServiceMapStructMapper {
@Autowired
@Qualifier("delegate") private PolicyWebServiceMapStructMapper delegate;
...
and here is the mapper code snippet
@Mapper(componentModel="spring")
@DecoratedWith(PolicyWebServiceMapStructMapperDecorator.class)
public interface PolicyWebServiceMapStructMapper {
public B mapAToB(A a)
}
Thanks,
Santosh