java lombok包在maven已经配置,但是getter setter不行
迷茫
迷茫 2017-04-18 10:05:58
0
5
643
迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(5)
巴扎黑

Lombok’s principle is to automatically generate code during compilation. The poster has configured it Maven。你通过mvn compile编译代码可以查看一下User.class中是否有生成get/set函数。如果楼主期望在idea中编码时编译的代码中自动使用lombokPlease install the following plug-in and configure it according to the document.
lombok-intellij-plugin

PHPzhong

Just install a lombok plug-in.

阿神

https://github.com/mplushniko...
idea, just install a plug-in

迷茫

If it is an eclipse development environment, after configuring maven dependencies, you also need to install the plug-in in eclipse
You can refer to the website:
http://www.360doc.com/content...

左手右手慢动作

If you use eclipse as the development environment, after configuring maven dependencies, you need to manually install lombok in eclipse/myeclipse.

lombok installation

使用 lombok 是需要安装的,如果不安装,IDE 则无法解析 lombok 注解。先在官网下载最新版本的 JAR 包。

1.eclipse / myeclipse manually install lombok

1. 将 lombok.jar 复制到 myeclipse.ini / eclipse.ini 所在的文件夹目录下
2. 打开 eclipse.ini / myeclipse.ini,在最后面插入以下两行并保存:
    -Xbootclasspath/a:lombok.jar
    -javaagent:lombok.jar
3.重启 eclipse / myeclip
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template