简体   繁体   English

龙目岛项目 AllArgsConstructor 不工作

[英]Project Lombok AllArgsConstructor not working

It seems like many people are having this problem, but none of the problems i have researched so far are that basic like my problem.似乎很多人都有这个问题,但到目前为止我研究过的问题都没有像我的问题那样基本。

I only got this object:我只得到了这个对象:

在此处输入图片说明

and a basic call in my main method:以及我的主要方法中的基本调用:

在此处输入图片说明

Bamm... already not working. Bamm...已经不工作了。 The compilataion fails with this error编译失败并出现此错误

在此处输入图片说明

I am using IntelliJ and have installed the Lombok plugin.我正在使用 IntelliJ 并安装了 Lombok 插件。

在此处输入图片说明

If it helps... here is my build.gradle:如果有帮助……这是我的 build.gradle: 在此处输入图片说明

Any ideas ?有任何想法吗 ?

Lombok uses the annotation processor to do its magic so you have to add lombok annotationProcessor dependency in your build.gradle file. Lombok 使用注释处理器来发挥它的魔力,因此您必须在 build.gradle 文件中添加 lombok annotationProcessor 依赖项。 Add this line inside your dependencies block:在您的dependencies块中添加此行:

annotationProcessor 'org.projectlombok:lombok:1.18.6'

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

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