zoukankan      html  css  js  c++  java
  • Jhispter不能使用Lombok解决方案

    原解决方案

    简而言之

    jhipster在pom文件中指定了注解处理器annotationProcessorPaths,没有增加lombok作为注解处理器,因此我们手动添加lombok即可

    原来

    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>${maven-compiler-plugin.version}</version>
    <configuration>
        <annotationProcessorPaths>
            <path>
                <groupId>org.mapstruct</groupId>
                <artifactId>mapstruct-processor</artifactId>
                <version>${mapstruct.version}</version>
            </path>
            <!-- For JPA static metamodel generation -->
            <path>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-jpamodelgen</artifactId>
                <version>${hibernate.version}</version>
            </path>
        </annotationProcessorPaths>
    </configuration>
    

    修改后

    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>${maven-compiler-plugin.version}</version>
    <configuration>
        <annotationProcessorPaths>
            <path>
                <groupId>org.mapstruct</groupId>
                <artifactId>mapstruct-processor</artifactId>
                <version>${mapstruct.version}</version>
            </path>
            <!-- For JPA static metamodel generation -->
            <path>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-jpamodelgen</artifactId>
                <version>${hibernate.version}</version>
            </path>
            # 增加lombok处理器
            <path>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>1.16.18</version>
            </path>
        </annotationProcessorPaths>
    </configuration>
    
  • 相关阅读:
    ubuntu nginx 伪静态 设置
    ubuntu thinkphp pathinfo 404等问题
    ubuntu svn安装测试
    ubuntu zendDebugger.so 加载不上的问题
    ubuntu ssh安装
    nyoj-660-逃离地球
    nyoj-643-发短信
    nyoj-181-小明的难题
    nyoj-663-弟弟的作业
    nyoj-682-初学者的烦恼
  • 原文地址:https://www.cnblogs.com/xiaojiluben/p/15162908.html
Copyright © 2011-2022 走看看