mapstruct与lombok结合使用

当mapstruct与lombok想结合使用的时候,出现了生成的MapperImpl里方法,没有对实体进行转换的情况。

解决方案:

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.2</version>
                <configuration>
                    <source>1.8</source> <!-- or higher, depending on your project -->
                    <target>1.8</target> <!-- or higher, depending on your project -->
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.mapstruct</groupId>
                            <artifactId>mapstruct-processor</artifactId>
                            <version>${org.mapstruct.version}</version>
                        </path>
                        <path>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                            <version>1.16.10</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>

 困惑了很久,上面的代码,并不能解决这个问题。求大神搭救!!!

原文地址:https://www.cnblogs.com/icebutterfly/p/9888188.html