首先检查是否安装lombok插件,没有安装就安装一下

以idea为例

1、File  → settings →  Plugins

2、输入 lombok 搜索插件, 点install安装,安装完重启idea

 

或者点击下图然后重新启动IDEA log变量就可以直接调用了。

IEDA中使用注解@Slf4j为什么找不到变量log?

我重启之后IDEA使用lombok,提示:

Lombok Requires Annotation Processing
Annotation processing seems to be disabled for the project "jhipster".
For  plugin to function correctly, please enable it under
"Settings > Build > Compiler > Annotation Processors"
Click on this notification to go to Settings now.

二、解决方法

file--->settings--->

IEDA中使用注解@Slf4j为什么找不到变量log?

相关文章:

  • 2021-06-14
  • 2021-05-23
  • 2021-06-26
  • 2021-10-04
  • 2022-01-23
  • 2021-04-25
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-30
  • 2022-12-23
  • 2021-06-29
相关资源
相似解决方案