Package org.mapstruct.extensions.spring
Annotation Interface SpringMapperConfig
Marks a class or interface as configuration source for the Spring extension. There can be only
one annotated type in each compiled module.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe class name for the generated Adapter between the MapStruct mappers and Spring'sConversionService.The package name for the generated Adapter between the MapStruct mappers and Spring'sConversionService.The bean name for the SpringConversionServiceto use.The class name for the generated Configuration class, which is performing auto-registration of converters/mappers to Spring'sConversionService.Additionalconversionswhich should be made available through the generated Adapter.booleanIndicates whether to generate aConverterScanwhen usingconversionServiceBeanName().booleanTo set if the Lazy annotation will be added to the ConversionService's usage in the ConversionServiceAdapter. -
Field Summary
Fields
-
Field Details
-
DEFAULT_CONVERSION_SERVICE_BEAN_NAME
- See Also:
-
DEFAULT_ADAPTER_CLASS_NAME
- See Also:
-
DEFAULT_CONFIGURATION_CLASS_NAME
- See Also:
-
-
Element Details
-
converterRegistrationConfigurationClassName
String converterRegistrationConfigurationClassNameThe class name for the generated Configuration class, which is performing auto-registration of converters/mappers to Spring'sConversionService.- Returns:
- The class name for the generated Configuration.
- Default:
- "ConverterRegistrationConfiguration"
-
conversionServiceAdapterPackage
String conversionServiceAdapterPackageThe package name for the generated Adapter between the MapStruct mappers and Spring'sConversionService. If omitted or empty, the package name will be the same as the one for the annotated type.- Returns:
- The package name for the generated Adapter.
- Default:
- ""
-
conversionServiceAdapterClassName
String conversionServiceAdapterClassNameThe class name for the generated Adapter between the MapStruct mappers and Spring'sConversionService.- Returns:
- The class name for the generated Adapter.
- Default:
- "ConversionServiceAdapter"
-
conversionServiceBeanName
String conversionServiceBeanNameThe bean name for the SpringConversionServiceto use.- Returns:
- The bean name for the Spring
ConversionService.
- Default:
- "conversionService"
-
lazyAnnotatedConversionServiceBean
boolean lazyAnnotatedConversionServiceBeanTo set if the Lazy annotation will be added to the ConversionService's usage in the ConversionServiceAdapter. Defaults to true.- Returns:
- true to add the Lazy annotation
- Default:
- true
-
generateConverterScan
boolean generateConverterScanIndicates whether to generate aConverterScanwhen usingconversionServiceBeanName(). Has no effect whenconversionServiceBeanName()is not set.- Returns:
true- GenerateConverterScan,false- otherwise
- Default:
- false
-
externalConversions
ExternalConversion[] externalConversionsAdditionalconversionswhich should be made available through the generated Adapter.- Returns:
- Additional
conversionswhich should be made available through the generated Adapter.
- Default:
- {}
-