简体   繁体   English

Lombok可以配置NetBeans 16吗?

[英]Can Lombok be configured with NetBeans 16?

Does NetBeans 16 support Lombok? NetBeans 16 是否支持 Lombok? Or, do I need to drop down to an early version of NetBeans in order to use it?或者,我是否需要降到 NetBeans 的早期版本才能使用它? I have a Maven Spring Boot project (Java 11) that will require Lombok support.我有一个需要 Lombok 支持的 Maven Spring 引导项目 (Java 11)。 So, far, the instructions I've come across for adding Lombok support to NetBeans do not appear to apply to NetBeans 16.所以,到目前为止,我遇到的将 Lombok 支持添加到 NetBeans 的说明似乎不适用于 NetBeans 16。

...so far, I've seen ...到目前为止,我已经看到

(1) (1)

a.一种。 Download the lombok.jar file and save it on your system.下载 lombok.jar 文件并将其保存在您的系统上。
b. b. Right-click the TestAnn project's node and choose Properties.右键单击 TestAnn 项目的节点并选择属性。
c. Select the Libraries category in the Project Properties dialog. c。Select 项目属性对话框中的库类别。
d. d. Click Add JAR/Folder in the Compile tab and locate the lombok.jar file that you downloaded单击“编译”选项卡中的“添加 JAR/文件夹”并找到您下载的 lombok.jar 文件

and...和...

(2) (2)

a.一种。 Add lombok.jar to the project libraries.将 lombok.jar 添加到项目库中。
b. b. In the project properties, in the section Build – Compiling, check the 'Enable Annotation Processing in Editor' checkbox.在项目属性中,在构建 – 编译部分中,选中“在编辑器中启用注释处理”复选框。

Neither of the above instructions appear to apply to what I now see in NetBeans 16 menus or context menus以上说明似乎都不适用于我现在在 NetBeans 16 菜单或上下文菜单中看到的内容

Does NetBeans 16 IDE support Lombok? NetBeans 16 IDE 是否支持龙目岛? If it does, then how is the lombok.jar applied/installed?如果是,那么 lombok.jar 是如何应用/安装的?

If NetBeans 16 is a running version without any bugs it will support the Lombok plugin.如果 NetBeans 16 是一个没有任何错误的运行版本,它将支持 Lombok 插件。 In NetBeans IDE use the Lombok Plugin for Maven this way, just include the dependency in your project POM.xml file and the plugin automatically applies the required configurations.在 NetBeans IDE 中,以这种方式使用 Lombok 插件 Maven,只需在项目 POM.xml 文件中包含依赖项,插件就会自动应用所需的配置。 Add the following dependency and check once:添加以下依赖并检查一次:

<dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
    <optional>true</optional>
</dependency>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM