如何解决:IntelliJ中似乎无法识别Lombok builder()方法? [英] How to fix: Lombok builder() method does not seem to be recognised in IntelliJ?
问题描述
我不确定我在做什么错.有人可以帮帮我吗
POM:
实施:
使用如下:
似乎无法识别builder()方法.我正在使用IntelliJ.有什么我想念的吗?
以下是我的智能设置:
除了提供的
范围中的依赖项之外,您还必须启用注释处理(如果使用的是IntelliJ Idea)并安装
Lombok插件:导航至 File
->设置
->插件
,并确保已安装Lombok插件.
重新启动IntelliJ Idea-最有可能错过的部分:)
I am not sure what am I doing wrong. Can somebody please help me out
POM:
Implementation:
Using it as below:
The builder() method does not seem to be recognised. I am using IntelliJ. Is there something that I am missing?
Below are my intelliJ settings:
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.
-
<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 checkEnable annotation processing
.Lombok Plugin: Navigate to
File
->Settings
->Plugins
and make sure the Lombok plugin is installed.Restart IntelliJ Idea - The most likely missed part :)
这篇关于如何解决:IntelliJ中似乎无法识别Lombok builder()方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!