Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
title: "MapStruct Spring Extensions 2.0.0 released"
author: Raimund Klein
date: "2025-11-15"
tags: [ release, news ]
---

It is my pleasure to announce the next official release of MapStruct Spring Extensions.
What started out as a [StackOverflow question](https://stackoverflow.com/q/58081224/3361467) turned into its
own [(sub-)project](https://github.com/mapstruct/mapstruct-spring-extensions) within the MapStruct organization.

Changes in this release:

- The minimum requirements for applying these extensions are now Java 17 and Spring 6.
- Exclusive use of `jakarta.annotation.PostConstruct` instead of having a default option of the legacy `javax.annotation.PostConstruct`.

Including the annotations and extensions defined in this project will generate a class acting as bridge between
MapStruct's conventions and Spring'
s [ConversionService API](https://docs.spring.io/spring-framework/docs/current/reference/html/core.html#core-convert-ConversionService-API)
that in turn can be added to any Mapper's `uses` attribute. See
the [examples](https://github.com/mapstruct/mapstruct-spring-extensions/tree/master/examples) for details.

<!--more-->

### Thanks

Thanks to [Sjaak Derksen](https://github.com/sjaakd) for suggesting this solution
and [Filip Hrisafov](https://github.com/filiphr) for opening the community project.
Also thanks
to [Jeff Schnitzer](https://github.com/stickfigure), [Jesse Bonzo](https://github.com/jbonzohln), [Cosimo Damiano Prete](https://github.com/cdprete), [Daniel Shiplett](https://github.com/danielshiplett), [Alexey](https://github.com/PRIESt512), [Olivier Boudet](https://github.com/olivierboudet), [John Kelly](https://github.com/postalservice14), [Myat Min](https://github.com/myatmin), [Hypercube Software](https://github.com/hypercube-software), [coding-guo](https://github.com/coding-guo), [freund17](https://github.com/freund17), [Joose Haverinen](https://github.com/joosehav), [pw-lehre](https://github.com/pw-lehre), [simonovdenis](https://github.com/simonovdenis),
and [George Noble](https://github.com/giorgioscia) for their suggestions and fixes in previous releases.
If you feel like there's something missing in MapStruct which could make the Spring experience any smoother, please get
involved!

Also, if your favourite library or framework could use some tweaking with regard to MapStruct, contact us.

Happy coding with MapStruct Spring Extensions!

### Download

You can fetch the release from Maven Central using the following GAV coordinates:

* Annotation
JAR: [org.mapstruct.extensions.spring:mapstruct-spring-annotations:2.0.0](http://search.maven.org/#artifactdetails|org.mapstruct.extensions.spring|mapstruct-spring-annotations|2.0.0|jar)
* Annotation processor
JAR: [org.mapstruct.extensions.spring:mapstruct-spring-extensions:2.0.0](http://search.maven.org/#artifactdetails|org.mapstruct.extensions.spring|mapstruct-spring-extensions|2.0.0|jar)
* Test Extensions with Converter Scan
JAR: [org.mapstruct.extensions.spring:mapstruct-spring-extensions:2.0.0](http://search.maven.org/#artifactdetails|org.mapstruct.extensions.spring|mapstruct-spring-test-extensions|2.0.0|jar)

Alternatively, you can get ZIP and TAR.GZ distribution bundles - containing all the JARs, documentation
etc. - [from GitHub](https://github.com/mapstruct/mapstruct-spring-extensions/releases/tag/v2.0.0).

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:

* Get help in our [Gitter room](https://gitter.im/mapstruct/mapstruct-users) or at
the [mapstruct-users](https://groups.google.com/forum/?fromgroups#!forum/mapstruct-users) group
* Report bugs and feature requests via
the [issue tracker](https://github.com/mapstruct/mapstruct-spring-extensions/issues)
* Follow [@GetMapStruct](https://twitter.com/GetMapStruct) on Twitter
2 changes: 1 addition & 1 deletion data/releases/spring-extensions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "Spring Extensions"
versionRef = "spring-extensions"
order = 450
releaseDate = 2025-03-14
releaseDate = 2025-11-15
spring = true
Original file line number Diff line number Diff line change
@@ -1,182 +1,80 @@
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="de">
<head>
<!-- Generated by javadoc -->
<title>All Classes (annotations 1.1.3 API)</title>
<!-- Generated by javadoc (17) -->
<title>All Classes and Interfaces (annotations 2.0.0 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="class index">
<meta name="generator" content="javadoc/AllClassesIndexWriter">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="jquery/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="script.js"></script>
<script type="text/javascript" src="jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="jquery/jquery-3.7.1.min.js"></script>
<script type="text/javascript" src="jquery/jquery-ui.min.js"></script>
<script type="text/javascript" src="script-dir/jquery-3.6.1.min.js"></script>
<script type="text/javascript" src="script-dir/jquery-ui.min.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="All Classes (annotations 1.1.3 API)";
}
}
catch(err) {
}
//-->
var pathtoroot = "./";
var useModuleDirectories = true;
<body class="all-classes-index-page">
<script type="text/javascript">var pathtoroot = "./";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="org/mapstruct/extensions/spring/package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="overview-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
<li><a href="help-doc.html#all-classes">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="sub-nav">
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<div class="header">
<h1 title="All&amp;nbsp;Classes" class="title">All&nbsp;Classes</h1>
<h1 title="All Classes and Interfaces" class="title">All Classes and Interfaces</h1>
</div>
<div class="allClassesContainer">
<ul class="blockList">
<li class="blockList">
<table class="typeSummary">
<caption><span>Annotation Types Summary</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><a href="org/mapstruct/extensions/spring/AdapterMethodName.html" title="annotation in org.mapstruct.extensions.spring">AdapterMethodName</a></td>
<th class="colLast" scope="row">
<div id="all-classes-table">
<div class="caption"><span>Annotation Interfaces</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Class</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color all-classes-table all-classes-table-tab7"><a href="org/mapstruct/extensions/spring/AdapterMethodName.html" title="annotation interface in org.mapstruct.extensions.spring">AdapterMethodName</a></div>
<div class="col-last even-row-color all-classes-table all-classes-table-tab7">
<div class="block">Overrides the default method name generated in the Adapter class.</div>
</th>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><a href="org/mapstruct/extensions/spring/DelegatingConverter.html" title="annotation in org.mapstruct.extensions.spring">DelegatingConverter</a></td>
<th class="colLast" scope="row">
<div class="block">Indicates that the system should generate a delegating <a href="https://docs.spring.io/spring/docs/5.0.0.RELEASE/javadoc-api/org/springframework/core/convert/converter/Converter.html?is-external=true" title="class or interface in org.springframework.core.convert.converter" class="externalLink"><code>Converter</code></a> that will call the annotated method in its
own <a href="https://docs.spring.io/spring/docs/5.0.0.RELEASE/javadoc-api/org/springframework/core/convert/converter/Converter.html?is-external=true#convert-S-" title="class or interface in org.springframework.core.convert.converter" class="externalLink"><code>Converter.convert(Object)</code></a>.</div>
</th>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><a href="org/mapstruct/extensions/spring/ExternalConversion.html" title="annotation in org.mapstruct.extensions.spring">ExternalConversion</a></td>
<th class="colLast" scope="row">
<div class="block">Allows the specification of a conversion that is available via the <a href="https://docs.spring.io/spring/docs/5.0.0.RELEASE/javadoc-api/org/springframework/core/convert/ConversionService.html?is-external=true" title="class or interface in org.springframework.core.convert" class="externalLink"><code>ConversionService</code></a>, but is <em>not</em>
declared as a MapStruct mapper within the scope of the <a href="org/mapstruct/extensions/spring/SpringMapperConfig.html" title="annotation in org.mapstruct.extensions.spring"><code>SpringMapperConfig</code></a>.</div>
</th>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><a href="org/mapstruct/extensions/spring/SpringMapperConfig.html" title="annotation in org.mapstruct.extensions.spring">SpringMapperConfig</a></td>
<th class="colLast" scope="row">
</div>
<div class="col-first odd-row-color all-classes-table all-classes-table-tab7"><a href="org/mapstruct/extensions/spring/DelegatingConverter.html" title="annotation interface in org.mapstruct.extensions.spring">DelegatingConverter</a></div>
<div class="col-last odd-row-color all-classes-table all-classes-table-tab7">
<div class="block">Indicates that the system should generate a delegating <a href="https://docs.spring.io/spring/docs/6.0.0/javadoc-api/org/springframework/core/convert/converter/Converter.html" title="class or interface in org.springframework.core.convert.converter" class="external-link"><code>Converter</code></a> that will call the annotated method in its
own <a href="https://docs.spring.io/spring/docs/6.0.0/javadoc-api/org/springframework/core/convert/converter/Converter.html#convert(S)" title="class or interface in org.springframework.core.convert.converter" class="external-link"><code>Converter.convert(Object)</code></a>.</div>
</div>
<div class="col-first even-row-color all-classes-table all-classes-table-tab7"><a href="org/mapstruct/extensions/spring/ExternalConversion.html" title="annotation interface in org.mapstruct.extensions.spring">ExternalConversion</a></div>
<div class="col-last even-row-color all-classes-table all-classes-table-tab7">
<div class="block">Allows the specification of a conversion that is available via the <a href="https://docs.spring.io/spring/docs/6.0.0/javadoc-api/org/springframework/core/convert/ConversionService.html" title="class or interface in org.springframework.core.convert" class="external-link"><code>ConversionService</code></a>, but is <em>not</em>
declared as a MapStruct mapper within the scope of the <a href="org/mapstruct/extensions/spring/SpringMapperConfig.html" title="annotation interface in org.mapstruct.extensions.spring"><code>SpringMapperConfig</code></a>.</div>
</div>
<div class="col-first odd-row-color all-classes-table all-classes-table-tab7"><a href="org/mapstruct/extensions/spring/SpringMapperConfig.html" title="annotation interface in org.mapstruct.extensions.spring">SpringMapperConfig</a></div>
<div class="col-last odd-row-color all-classes-table all-classes-table-tab7">
<div class="block">Marks a class or interface as configuration source for the Spring extension.</div>
</th>
</tr>
</table>
</li>
</ul>
</div>
</div>
</div>
</main>
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="org/mapstruct/extensions/spring/package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="overview-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>

This file was deleted.

Loading