Lombok 注释无法在 Intellij 想法下编译 [英] Lombok annotations do not compile under Intellij idea
本文介绍了Lombok 注释无法在 Intellij 想法下编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
- 我已经安装了 intellij idea 的插件(lombok-plugin-0.8.6-13).
- 将 lombok.jar 添加到类路径中
- 我可以在结构窗口中找到 getter 和 setter.Intellij 没有显示任何错误.
- 设置 - Lombok 插件 - 已验证 lombok 的 Intellij 配置,显示IntelliJ 的配置似乎没问题".
看起来一切正常.但是当我编译一个测试时,错误来了:找不到方法 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.
谁能告诉我为什么?
- 插件: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)
- 构建、执行、部署
- 编译器
- 注释处理器
- 启用注释处理
确保您安装了 IntelliJ 的 Lombok 插件!
Make sure you have the Lombok plugin for IntelliJ installed!
- 首选项
->
插件 - 搜索Lombok 插件"
- 点击浏览存储库...
- 选择 Lombok 插件
- 安装
- 重启 IntelliJ
这篇关于Lombok 注释无法在 Intellij 想法下编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
- 注释处理器
- 编译器
- 构建、执行、部署
查看全文