zoukankan      html  css  js  c++  java
  • 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>

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

  • 相关阅读:
    几种任务调度的 Java 实现方法与比较
    nginx配置
    生产消费_lock和阻塞队列
    阻塞队列
    countdownlatch+cyclicbarrier+semphore
    01背包
    skiplist
    lru
    按序打印_lock和condition
    按序打印_volatile 无法保证顺序
  • 原文地址:https://www.cnblogs.com/icebutterfly/p/9888188.html
Copyright © 2011-2022 走看看