I am very happy to announce the first release candidate of MapStruct 1.5!
This release provides mostly bug fixes and other smaller improvements since 1.5.0.Beta2.
- Support for Jakarta dependency injection
- Various small bug fixes and documentation clarifications
Altogether, not less than 25 issues were fixed for this release.
This would not have been possible without our fantastic community of contributors:
our latest MapStruct contributor Ben Zegveld
Thank you everyone for all your hard work!
We’d like to thank our community for the feedback on our Beta releases and for their contributions.
MapStruct can now detect whether you are using Jakarta or Javax dependency injection based on what you have during compilation.
When using the
jsr330 component model and when you don’t have the Javax, but you do have the Jakarta dependency injection then MapStruct will use the Jakarta dependency injection classes.
In addition to that there is also a new
componentModel that can be used to tell MapStruct to only use the Jakarta dependency injection classes.
This can be used when you have the 2 dependencies, and you want to use Jakarta.
@InheritInverseConfiguration can now be used for
@SubclassMapping(s) as well.
- There is now a compiler error if there are unimplemented lifecycle
@AfterMappingmethods in your mapper
- Builders can be disabled using the compiler argument
CLASSretention policy for
@DecoratedWithin order for it to work properly with Gradle 7.3 incremental compilation
- Relax the use of qualifiers with 2-step mapping methods
We have been made aware that the introduction of the mapping from
Map<String, ???> to Bean has lead to some breaking changes in some scenarios.
Some known changes are:
- Qualifiers for map sources as explained in issue #2549
- Implicit map to map mappings as explained in issue #2764
This concludes our tour through MapStruct 1.5 RC1. If you’d like to try out the features described above, you can fetch the new release from Maven Central using the following GAV coordinates:
- Annotation JAR: org.mapstruct:mapstruct:1.5.0.RC1
- Annotation processor JAR: org.mapstruct:mapstruct-processor:1.5.0.RC1
Alternatively, you can get ZIP and TAR.GZ distribution bundles - containing all the JARs, documentation etc. - from GitHub.
If you run into any trouble or would like to report a bug, feature request or similar, use the following channels to get in touch: