Lombok注释不能在Intellij构思下编译 [英] Lombok annotations do not compile under Intellij idea

查看:113
本文介绍了Lombok注释不能在Intellij构思下编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  1. 我已经为intellij idea安装了插件(lombok-plugin-0.8.6-13)。

  2. 将lombok.jar添加到classpath中

  3. 我可以在结构窗口找到getter和setter。并且Intellij没有显示错误。

  4. 设置 - Lombok插件 - 验证了lombok的Intellij配置,它显示IntelliJ的配置似乎没问题。

  1. I've installed the plugin for intellij idea(lombok-plugin-0.8.6-13).
  2. Added lombok.jar into classpath
  3. I can find getters and setters in the window of structure. And Intellij shows no error.
  4. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆