[英]How to fix: Lombok builder() method does not seem to be recognised in IntelliJ?
I am not sure what am I doing wrong.我不确定我做错了什么。 Can somebody please help me out
有人可以帮帮我吗
The builder() method does not seem to be recognised.似乎无法识别 builder() 方法。 I am using IntelliJ.
我正在使用 IntelliJ。 Is there something that I am missing?
有什么我想念的吗?
Below are my intelliJ settings:以下是我的智能设置:
Assuming you use IntelliJ: You have to install Lombok Plugin in order to make it work:假设您使用 IntelliJ:您必须安装Lombok 插件才能使其工作:
File > Settings > Plugins
File > Settings > Plugins
Lombok Plugin
Lombok Plugin
Aside from the dependency in the provided
scope you have to enable the annotation processing (if you are using IntelliJ Idea) and install the Lombok Plugin .除了
provided
的 scope 中的依赖项之外,您还必须启用注释处理(如果您使用的是 IntelliJ Idea)并安装Lombok 插件。
<dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>${lombok.version}</version> <scope>provided</scope> </dependency>
Annotation processing: Navigate to File
-> Settings
-> Build, Execution, Deployment
-> Compiler
-> Annotation Processors
and check Enable annotation processing
.注释处理:导航到
File
-> Settings
-> Build, Execution, Deployment
-> Compiler
-> Annotation Processors
并选中Enable annotation processing
。
Lombok Plugin: Navigate to File
-> Settings
-> Plugins
and make sure the Lombok plugin is installed. Lombok 插件:导航到
File
-> Settings
-> Plugins
并确保安装了 Lombok 插件。
Restart IntelliJ Idea - The most likely missed part:)重启 IntelliJ Idea -最有可能遗漏的部分:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.