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>
    
  • 相关阅读:
    Go基础
    格式化输入输出
    常量
    Go语言基础之变量
    跨平台编译
    Hello World
    使用go module导入本地包
    Go语言之依赖管理
    Go包管理
    Go项目结构
  • 原文地址:https://www.cnblogs.com/xiaojiluben/p/15162908.html
Copyright © 2011-2022 走看看