Lombok注释不能在Intellij构思下编译 [英] Lombok annotations do not compile under Intellij idea
本文介绍了Lombok注释不能在Intellij构思下编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
- 我已经为intellij idea安装了插件(lombok-plugin-0.8.6-13)。
- 将lombok.jar添加到classpath中
- 我可以在结构窗口找到getter和setter。并且Intellij没有显示错误。
- 设置 - Lombok插件 - 验证了lombok的Intellij配置,它显示IntelliJ的配置似乎没问题。
- I've installed the plugin for intellij idea(lombok-plugin-0.8.6-13).
- Added lombok.jar into classpath
- I can find getters and setters in the window of structure. And Intellij shows no error.
- Setting - Lombok plugin - Verified Intellij configuration for lombok, it shows that "configuration of IntelliJ seems to be ok".
似乎一切正常。但是当我编译测试时,错误来了:找不到方法getXXX和setXXX。
It seems everything is OK. But when I compile a test, errors come: can not find the methods getXXX and setXXX.
我用IntelliJ打开.class文件,发现没有setXXX和getXXX方法。
I opened the .class file with IntelliJ and find out that there is no setXXX and getXXX methods.
有人可以告诉我为什么吗?
Could somebody tell me why?
- 插件:lombok -plugin-0.8.6-13
- lombok.jar:1.14.0
- idea:13.0.2 for linux
- jdk:1.7.0_21
- plugin:lombok-plugin-0.8.6-13
- lombok.jar:1.14.0
- idea:13.0.2 for linux
- jdk:1.7.0_21
推荐答案
为了解决问题集:
- 首选项(Ctrl + Alt + S)
- Build ,执行,部署
- 编译器
- 注释处理器
- 启用注释处理
确保安装了IntelliJ的Lombok插件!
Make sure you have the Lombok plugin for IntelliJ installed!
- 偏好设置
- >
插件 - 搜索龙目岛插件
- 点击浏览存储库...
- 选择Lombok插件
- 安装
- 重启IntelliJ
- Preferences
->
Plugins - Search for "Lombok Plugin"
- Click Browse repositories...
- Choose Lombok Plugin
- Install
- Restart IntelliJ
这篇关于Lombok注释不能在Intellij构思下编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
- 注释处理器
- 编译器
- Build ,执行,部署
查看全文