简体   繁体   中英

IntelliJ won't find generated code from Lombok while gradle does

I have IntelliJ Ultimate 2019.2 installed with the latest Lombok plugin (0.25). Furthermore, Lombok is enabled for my project (Preferences --> Other Settings --> Lombok Plugin) and the plugin installed. Annotation Processing is also enabled. My project uses Java11.

Everything works fine when I run my application via Gradle or run unit tests via ./gradlew test.

When I now configure to use IntelliJ IDEA tooling (Preferences --> Build, Executions, Deployment --> Built Tools --> Gradle --> Both 'Build an Run using:' and 'Run tests using:' set to 'IntelliJ IDEA') it stops working, my generated classes are not found.

I receive exceptions, that my constructors are not found, while they were found when I am using gradle

(no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator)

我点击了Refactor->Lombok->@Log and friends和 IDEA 开始编译代码。

Intellij does not have a built in support for Lombok. You need to install the Lombok plugin to be able to use it in intellij.

You can find the plugin from this link:

https://plugins.jetbrains.com/plugin/6317-lombok

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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