最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

java - SpringBootLombok Debugging in IntelliJ - Stack Overflow

programmeradmin4浏览0评论

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

发布评论

评论列表(0)

  1. 暂无评论