background:
After using the lombok plugin for the springboot project, add the mapstruct plugin. The mapstruct plugin does not work when maven is compiled.
Let ’s hurriedly record a solution
One solution:
Add the following dependencies to the pom file. The mapstruct version used by the author is 1.3.0.Final
<!-- 解决lombok插件和 mapstruct 冲突导致 mapstruct 不可用 -->
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>1.3.0.Final</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-jdk8</artifactId>
<version>1.3.0.Final</version>
</dependency>