mirror of
https://gitee.com/easii/mapstruct-plus.git
synced 2025-12-07 09:38:45 +08:00
73 lines
2.5 KiB
Markdown
73 lines
2.5 KiB
Markdown
---
|
|
title: 常见问题
|
|
order: 8
|
|
---
|
|
|
|
# 与 `lombok` 整合
|
|
|
|
与 Mapstruct 整合 lombok 的方式一致。
|
|
|
|
- lombok 1.18.16 之前:
|
|
|
|
```xml
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<version>3.8.1</version>
|
|
<configuration>
|
|
<source>1.8</source>
|
|
<target>1.8</target>
|
|
<annotationProcessorPaths>
|
|
<path>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
<version>${lombok.version}</version>
|
|
</path>
|
|
<path>
|
|
<groupId>io.github.linpeilie</groupId>
|
|
<artifactId>mapstruct-plus-processor</artifactId>
|
|
<version>${mapstruct-plus.version}</version>
|
|
</path>
|
|
</annotationProcessorPaths>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
```
|
|
|
|
- lombok 1.18.16 之后:
|
|
|
|
```xml
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<version>3.8.1</version>
|
|
<configuration>
|
|
<source>1.8</source>
|
|
<target>1.8</target>
|
|
<annotationProcessorPaths>
|
|
<path>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
<version>${lombok.version}</version>
|
|
</path>
|
|
<path>
|
|
<groupId>io.github.linpeilie</groupId>
|
|
<artifactId>mapstruct-plus-processor</artifactId>
|
|
<version>${mapstruct-plus.version}</version>
|
|
</path>
|
|
<path>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok-mapstruct-binding</artifactId>
|
|
<version>0.2.0</version>
|
|
</path>
|
|
</annotationProcessorPaths>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
``` |