| Modifier and Type | Optional Element and Description |
|---|---|
String |
adapterClassName
默认类名为:ConvertMapperAdapter
|
String |
adapterPackage
默认包名为:io.github.linpeilie
|
String |
autoConfigPackage
MapStructPlus 所生成的配置类(AutoMapperConfig/AutoMapMapperConfig)包路径
默认包路径为 io.github.linpeilie |
String |
autoMapMapperConfigClassName
MapStructPlus 所生成的配置 Map 与对象转换的配置类名
默认类名为 AutoMapMapperConfig |
String |
autoMapperConfigClassName
MapStructPlus 所生成的配置类转换的配置类名
默认类名为 AutoMapperConfig |
org.mapstruct.Builder |
builder
构造者模式配置,由于 mapstruct 和 lombok 和 builder 一起使用时,会丢失父类属性,这里默认改为关闭
|
org.mapstruct.CollectionMappingStrategy |
collectionMappingStrategy
The strategy to be applied when propagating the value of collection-typed properties.
|
String |
mapAdapterClassName
默认类名为:MapConvertMapperAdapter
|
String |
mapperPackage
所生成的 Mapper 接口的包
|
Class<? extends Annotation> |
mappingControl
Allows detailed control over the mapping process.
|
org.mapstruct.NullValueCheckStrategy |
nullValueCheckStrategy
Determines when to include a null check on the source property value of a bean mapping.
|
org.mapstruct.NullValueMappingStrategy |
nullValueIterableMappingStrategy
The strategy to be applied when
null is passed as source argument value to an IterableMapping. |
org.mapstruct.NullValueMappingStrategy |
nullValueMapMappingStrategy
The strategy to be applied when
null is passed as source argument value to a MapMapping. |
org.mapstruct.NullValueMappingStrategy |
nullValueMappingStrategy
空对象的映射策略,默认返回
null |
org.mapstruct.NullValuePropertyMappingStrategy |
nullValuePropertyMappingStrategy
当属性值为
null 时应对的策略,默认设置为 null |
boolean |
suppressTimestampInGenerated
Flag indicating whether the addition of a time stamp in the
@Generated annotation should be suppressed. |
org.mapstruct.ReportingPolicy |
typeConversionPolicy
How lossy (narrowing) conversion, for instance: long to integer should be
reported.
|
Class<? extends Exception> |
unexpectedValueMappingException
Exception that should be thrown by the generated code if no mapping matches for enums.
|
org.mapstruct.ReportingPolicy |
unmappedSourcePolicy
当来源类中没有对应属性时的策略,默认忽略
|
org.mapstruct.ReportingPolicy |
unmappedTargetPolicy
当目标类中没有对应属性时的策略,默认忽略
|
public abstract String mapperPackage
public abstract org.mapstruct.ReportingPolicy unmappedSourcePolicy
ReportingPolicypublic abstract org.mapstruct.ReportingPolicy unmappedTargetPolicy
ReportingPolicypublic abstract org.mapstruct.ReportingPolicy typeConversionPolicy
public abstract org.mapstruct.CollectionMappingStrategy collectionMappingStrategy
orderDto.addOrderLine()).public abstract org.mapstruct.NullValueMappingStrategy nullValueMappingStrategy
nullNullValueMappingStrategypublic abstract org.mapstruct.NullValueMappingStrategy nullValueIterableMappingStrategy
null is passed as source argument value to an IterableMapping.
If no strategy is configured, the strategy given via nullValueMappingStrategy() will be applied, using
NullValueMappingStrategy.RETURN_NULL by default.null is passed as source value to an IterableMapping.public abstract org.mapstruct.NullValueMappingStrategy nullValueMapMappingStrategy
null is passed as source argument value to a MapMapping.
If no strategy is configured, the strategy given via nullValueMappingStrategy() will be applied, using
NullValueMappingStrategy.RETURN_NULL by default.null is passed as source value to a MapMapping.public abstract org.mapstruct.NullValuePropertyMappingStrategy nullValuePropertyMappingStrategy
null 时应对的策略,默认设置为 nullNullValuePropertyMappingStrategypublic abstract org.mapstruct.NullValueCheckStrategy nullValueCheckStrategy
Mapper, BeanMapping or Mapping.public abstract Class<? extends Annotation> mappingControl
DeepClone,
NoComplexMapping,
MappingControlpublic abstract Class<? extends Exception> unexpectedValueMappingException
IllegalArgumentException will be used by default.
Note:
String parameter.
public abstract boolean suppressTimestampInGenerated
@Generated annotation should be suppressed.
i.e. not be added.
The method overrides the flag set through an annotation processor option.public abstract org.mapstruct.Builder builder
Builderpublic abstract String adapterPackage
public abstract String adapterClassName
public abstract String mapAdapterClassName
public abstract String autoConfigPackage
public abstract String autoMapperConfigClassName
public abstract String autoMapMapperConfigClassName
Copyright © 2025. All rights reserved.