admin管理员组

文章数量:1208155

The project builds and runs successfully via command line, but if I want to build/launch the debugger via Intellij, the lombok @Builder seems not to be recognized:

java: cannot find symbol
  symbol:   class MyClassBuilder
  location: class com.xxx.MyClass

package com.xxx;

import lombok.Builder;

@Builder

public class MyClass {
    //code
}
  • I have lombok plugin
  • I have enabled annotation processing
  • I have selected Obtain processors from project class path
  • I have tried several debug config changes, invalidate intellij cache/restart but no luck

The project builds and runs successfully via command line, but if I want to build/launch the debugger via Intellij, the lombok @Builder seems not to be recognized:

java: cannot find symbol
  symbol:   class MyClassBuilder
  location: class com.xxx.MyClass

package com.xxx;

import lombok.Builder;

@Builder

public class MyClass {
    //code
}
  • I have lombok plugin
  • I have enabled annotation processing
  • I have selected Obtain processors from project class path
  • I have tried several debug config changes, invalidate intellij cache/restart but no luck
Share Improve this question asked Jan 20 at 15:17 user6610998user6610998 1
Add a comment  | 

2 Answers 2

Reset to default 0

The workaround is described in below answer on intellij forum

https://intellij-support.jetbrains.com/hc/en-us/community/posts/23064675521682/comments/23204746556050

as answer is suggesting to include

<version>${lombok.version}</version>

against lombok annotation processor configuration in your pom.xml.

Above solution worked for me!

Solution: IntelliJ Project SDK was setup as java 23; however the build in command line was using java 17 I changed the SDK in IntelliJ project struct to java 17 and the issue got resolved

本文标签: javaSpringBootLombok Debugging in IntelliJStack Overflow