龙目岛与 Maven 和 Eclipse

Lombok with Maven and Eclipse

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

pom.xml ref https://projectlombok.org/mavenrepo/index.html

中添加以上行

这些行会做什么?

他们会在我的项目中下载并安装 Lombok 吗?

如果是,则此方法无效。

@数据注释未创建 getter 设置器。

您不能通过简单地将其作为依赖项来使用 Lombok,您也必须将其安装到您最喜欢的 IDE。见 documentation here:

Project Lombok is available as a single jar file on the project site. It includes the APIs for development as an installer for IDE integration. On most systems, simply double-clicking the jar file will launch the installer. If the system is not configured to correctly launch jar files, it can also be run from the command line as follows:

java -jar lombok.jar

依赖项是附加的,而不是。