推荐必看:https://blog.csdn.net/persistencegoing/article/details/84376427
首先检查是否安装lombok插件,没有安装就安装一下
以idea为例
1、File → settings → Plugins
2、输入 lombok 搜索插件, 点install安装,安装完重启idea
或者点击下图然后重新启动IDEA 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--->