Package org.mapstruct.extensions.spring
Annotation Type SpringMapperConfig
-
@Target(TYPE) @Retention(SOURCE) public @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 Elements Modifier and Type Optional Element Description java.lang.String
conversionServiceAdapterClassName
The class name for the generated Adapter between the MapStruct mappers and Spring'sConversionService
.java.lang.String
conversionServiceAdapterPackage
The package name for the generated Adapter between the MapStruct mappers and Spring'sConversionService
.java.lang.String
conversionServiceBeanName
The bean name for the SpringConversionService
to use.ExternalConversion[]
externalConversions
Additionalconversions
which should be made available through the generated Adapter.boolean
generateConverterScan
Indicates whether to generate aConverterScan
when usingconversionServiceBeanName()
.boolean
lazyAnnotatedConversionServiceBean
To set if the Lazy annotation will be added to the ConversionService's usage in the ConversionServiceAdapter.
-
-
-
Element Detail
-
conversionServiceAdapterPackage
java.lang.String conversionServiceAdapterPackage
The 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
java.lang.String conversionServiceAdapterClassName
The class name for the generated Adapter between the MapStruct mappers and Spring'sConversionService
.- Returns:
- The class name for the generated Adapter.
- Default:
- "ConversionServiceAdapter"
-
-
-
conversionServiceBeanName
java.lang.String conversionServiceBeanName
The bean name for the SpringConversionService
to use.- Returns:
- The bean name for the Spring
ConversionService
.
- Default:
- ""
-
-
-
generateConverterScan
boolean generateConverterScan
Indicates whether to generate aConverterScan
when usingconversionServiceBeanName()
. Has no effect whenconversionServiceBeanName()
is not set.- Returns:
true
- GenerateConverterScan
,false
- otherwise
- Default:
- false
-
-
-
externalConversions
ExternalConversion[] externalConversions
Additionalconversions
which should be made available through the generated Adapter.- Returns:
- Additional
conversions
which should be made available through the generated Adapter.
- Default:
- {}
-
-