字节流的博客

在 IntelliJ IDEA 中配置 Lombok

  1. Preferences -> Plugins:搜索并安装 Lombok Plugin(源码地址:Lombok Plugin);
  2. Preferences -> Build, Execution, Deploymen -> Compiler -> Java Compiler:Use CompilerEclipse;
  3. Preferences -> Build, Execution, Deploymen -> Compiler -> Annotation Processors:Enable annotation processing 选中
  4. 下载 Lombok.jar 到指定目录下:/path/to/lombok.jar
  5. Preferences -> Build, Execution, Deploymen -> Compiler:Shared build process VM options 填写: -javaagent:/path/to/lombok.jar

版本:IntelliJ IDEA 2016.3.3(其他版本相似)

参考

  1. http://stackoverflow.com/questions/24006937/lombok-annotations-do-not-compile-under-intellij-idea/30125507#30125507
Thanks! 😊