-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvement: Customize class name and bean name for ConverterRegistrationConfiguration #119
Comments
Hello, |
That's quite odd. We've definitely received PRs from others without having to add them to the organisation or repo beforehand. @filiphr Have you got an idea what could be wrong here? |
Non-members can follow the basic GitHub flow:
|
@Chessray Do I have to add something else to PR for its successful approval/merge? |
PR: #121 merged to main. So feature will be available in next release. |
As of now, Mapstruct spring extension(more specifically ConverterRegistrationConfigurationGenerator) generates configuration class with name ConverterRegistrationConfiguration, name of this bean/component is not set, ie defaults to converterRegistrationConfiguration:
in my project Mapstruct is used in multiple places: a different set of mappers is implemented for each of them. So 2 different mapstruct related spring configs are defined with pretty much identical content:
and
when application is started I see a conflict between them due to same bean name used in both cases for ConverterRegistrationConfiguration instance:
So I want to propose to provide ability to configure it's class name and bean name(just like it is done for adapter class - conversionServiceAdapterClassName in org.mapstruct.extensions.spring.SpringMapperConfig with default value "ConversionServiceAdapter"), so smth like:
converterRegistrationConfigurationClassName in org.mapstruct.extensions.spring.SpringMapperConfig with default value "ConverterRegistrationConfiguration"
The text was updated successfully, but these errors were encountered: