Quick

The conversion between Java classes requires only additional annotation, reducing the tedious and error-prone development task

Efficiency

Based on the annotation processors, all of the generation is done at compile time

Conversion

Property conversions are based on getter/setter methods in the class

Compatibility

Support JDK8~17、SpringBoot2~3

Multi-class conversion

Support for a single class to configure multiple type conversions

Conversion between Map and Object

More powerful map-to-object functionality

Other Open Source Project

Latest Version

  • maven
<dependency>
    <groupId>io.github.linpeilie</groupId>
    <artifactId>mapstruct-plus-spring-boot-starter</artifactId>
    <version>1.5.0</version>
</dependency>
  • gradle
implementation group: 'io.github.linpeilie', name: 'mapstruct-plus-spring-boot-starter', version: '1.5.0'

Change Log

  • Upgrade MapStruct version to 1.6.3
    • Upgrade Notice: MapStruct 1.6 introduced breaking changes. Upgrading may cause compatibility issues. Refer to the MapStruct [Release Notes for details.] (https://github.com/mapstruct/mapstruct/releases)

      In MapStruct 1.6, support for presence checks on source parameters was added. This means that even if you want to map a source parameter directly to a target property, you must now define the presence check method using the new @SourceParameterCondition annotation or @Condition(appliesTo = ConditionStrategy.SOURCE_PARAMETERS).

  • Converter now supports the Consumer functional interface
  • pr133open in new window : AutoMapper, AutoMapping, and ReverseAutoMapping now support repeated configurations.
  • pr141open in new window : Added the uses property to MapperConfig for configuring globally shared custom converter classes.

1.4.8

  • Fixed the issue where the generated conversion implementation class conflicted when using the default Eclipse jdt.core environment in Vscode;
  • Repackaged javapoet to prevent conflicts with other projects.
  • Upgraded spring-boot-autoconfigure version from 2.7.9 to 2.7.18.

1.4.6

  • Modify the SpringContextUtils class name to prevent conflicts with other project class names;
  • fix #108open in new window : SpringContextUtils#getBeanFactory method changes to static;
  • PRopen in new window : increase annotation batch AutoMappingAutoMappingsReverseAutoMappingReverseAutoMappings features.

……

Code Warehouse

Participate and contribute

  • Contribution Code: You are welcome to submit an issue or pull requests
  • Maintain Documents: Docs directory under the project directory, welcome to participate in the translation and revision