Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up@Mapper(componentModel = "spring") doesn't support custom name for Spring Service Annotation #1427
Comments
@zurbergram yes this is not possible in the moment out of the box. However, there is a way for you to achieve what you are looking for with some internal customizations. We have an internal SPI ModelElementProcessor that adds the spring What you can do is to define your own Just keep in mind that this is an internal SPI, which means that we cannot guarantee backwards compatibility between versions. However, it is rarely changed. |
…mponent models Added two new annotations that allows to configure the component models, e. g. the bean name * MapperSpringConfig * MapperJsr330Config
…mponent models Added two new annotations that allows to configure the component models, e. g. the bean name * MapperSpringConfig * MapperJsr330Config
…mponent models Added two new annotations that allows to configure the component models, e. g. the bean name * MapperSpringConfig * MapperJsr330Config
…mponent models Added two new annotations that allows to configure the component models, e. g. the bean name * MapperSpringConfig * MapperJsr330Config
…mponent models Added two new annotations that allows to configure the component models, e. g. the bean name * MapperSpringConfig * MapperJsr330Config
…mponent models Added two new annotations that allows to configure the component models, e. g. the bean name * MapperSpringConfig * MapperJsr330Config
Oups, sorry! I wasn't aware about the fact that changes in my forked mapstruct repo will directly be linked to this issue. Hopefully I haven't spammed you with too much notification mails. @filiphr as my changes are now linked here maybe you could already take a look or should I create a PR? (this is my more or less first 'real' OS contribution; right now I am waiting that the built finishs locally including all tests) I tried to add the possibility to have an extra annotation ( Maybe its better to extend the |
…mponent models Added two new annotations that allows to configure the component models, e. g. the bean name * MapperSpringConfig * MapperJsr330Config
I've tried your suggestion, but the Processor is not picked up by org.mapstruct.ap.MappingProcessor in method getProcessors() (v1.3.1.Final):
I assume it's because my |
Just to share some info about how this can be done with some custom Spring Let's say that we have the following:
Then your configuration can look like the following:
|
Can't specify a name for the Spring Service annotation
If the interface definition something like