当前位置 主页 > 服务器问题 > win服务器问题汇总 >

    java10下编译lombok注解代码分享(2)

    栏目:win服务器问题汇总 时间:2019-11-10 10:30

    解决

    这是当前1.16.20版本的问题,通过升级到最新snapshot版本1.16.21即可搞定,1.16.21的版本更新描述如下:

    version: 1.16.21 (2018-03-29 11:54:42 UTC)
    v1.16.20 is the latest stable release of Project Lombok.
    PLATFORM: Fix for using lombok together with JDK9's new module-info.java feature. Issue #985
    PLATFORM: Some initial work on supporting JDK10.
    BUGFIX: Potential fix for Netbeans < 9. Issue #1555
    PROMOTION: var has been promoted from experimental to the main package with no changes. The 'old' experimental one is still around but is deprecated, and is an alias for the new main package one. var documentation.
    OLD-CRUFT: lombok.experimental.Builder and lombok.experimental.Value are deprecated remnants of when these features were still in experimental. They are now removed entirely. If your project is dependent on an older version of lombok which still has those; fret not, lombok still processes these annotations. It just no longer includes them in the jar.

    本地安装

    mvn install:install-file -Dfile=lombok-1.16.21.jar -DgroupId=org.lombokproject -DartifactId=lombok -Dversion=1.16.21 -Dpackaging=jar

    更新依赖

    <dependency>
          <groupId>org.projectlombok</groupId>
          <artifactId>lombok</artifactId>
          <version>1.16.21</version>
          <scope>provided</scope>
        </dependency>

    这样就大功告成了,如果大家在测试的时候还有任何疑问,可以在下方留言区讨论,感谢大家对IIS7站长之家的支持。