You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/src/main/asciidoc/chapter-14-third-party-api-integration.asciidoc
+150-1Lines changed: 150 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,4 +38,153 @@ public @interface Default {
38
38
39
39
}
40
40
----
41
-
====
41
+
====
42
+
43
+
[[lombok]]
44
+
=== Lombok
45
+
46
+
MapStruct works together with https://projectlombok.org/[Project Lombok] as of MapStruct 1.2.0.Beta1 and Lombok 1.16.14.
47
+
48
+
MapStruct takes advantage of generated getters, setters, and constructors and uses them to generate the mapper implementations.
49
+
50
+
[NOTE]
51
+
====
52
+
Lombok 1.18.16 introduces a breaking change (https://projectlombok.org/changelog[changelog]).
53
+
The additional annotation processor `lombok-mapstruct-binding` (https://mvnrepository.com/artifact/org.projectlombok/lombok-mapstruct-binding[Maven]) must be added otherwise MapStruct stops working with Lombok.
54
+
This resolves the compilation issues of Lombok and MapStruct modules.
55
+
56
+
[source, xml]
57
+
----
58
+
<path>
59
+
<groupId>org.projectlombok</groupId>
60
+
<artifactId>lombok-mapstruct-binding</artifactId>
61
+
<version>0.1.0</version>
62
+
</path>
63
+
----
64
+
====
65
+
66
+
==== Set up
67
+
68
+
The set up using Maven or Gradle does not differ from what is described in <<setup>>. Additionally, you need to provide Lombok dependencies.
Copy file name to clipboardExpand all lines: documentation/src/main/asciidoc/chapter-3-defining-a-mapper.asciidoc
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -516,7 +516,8 @@ public class PersonMapperImpl implements PersonMapper {
516
516
517
517
Supported builder frameworks:
518
518
519
-
* https://projectlombok.org/[Lombok] - requires having the Lombok classes in a separate module. See for more information https://github.com/rzwitserloot/lombok/issues/1538[rzwitserloot/lombok#1538]
519
+
* https://projectlombok.org/[Lombok] - It is required to have the Lombok classes in a separate module.
520
+
See for more information at https://github.com/rzwitserloot/lombok/issues/1538[rzwitserloot/lombok#1538] and to set up Lombok with MapStruct, refer to <<lombok>>.
* https://immutables.github.io/[Immutables] - When Immutables are present on the annotation processor path then the `ImmutablesAccessorNamingStrategy` and `ImmutablesBuilderProvider` would be used by default
522
523
* https://github.com/google/FreeBuilder[FreeBuilder] - When FreeBuilder is present on the annotation processor path then the `FreeBuilderAccessorNamingStrategy` would be used by default.
0 commit comments