IDEA中lombok无法生效的问题。

遇到的问题是,项目正确导入依赖了,项目也没有报错,但是build时却一直报错,报错位置我Builder、Get和Set方法。

百度之后都是两方面的问题:

1、添加插件:

file-->setting-->plugins点击下方的 browse repositories。
搜索lombok plugin。
安装后,重启。

2、勾选配置
file-->setting-->build,excecution,deployment-->compiler-->annotation processors勾选上 enable annotation processing。即可生效。

然而前两步都弄完了还是不行,后来又找到了一个解决方式,就是“发现是我的父级项目没有开启注解处理Annotation Processor,子项目都有开启,如图,顶级项目是demo,下面的都是子项目,把第一行的Enable annotation processing 打勾即可”。

感谢【百度经验】提供的帮助!

https://jingyan.baidu.com/article/a378c960fdfcefb328283037.html

你可能感兴趣的:(JAVA)