1. 先是在maven项目的pom依赖中添加了lombok的依赖了
<dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.12</version> </dependency>
到这我就以为是可以使用了,但是 getter /setter还是不出来,于是继续找答案
2. 然后勾选使注解生效的配置
file-->setting-->build,excecution,deployment-->compiler-->annotation processors勾选上 enable annotation processing。即可生效。
还是不行的哇,到底是哪里的原因哇,继续找答案
3.最后
添加插件:
file-->setting-->plugins点击下方的 browse repositories。
搜索lombok plugin。
安装后,重启。
到了这个步骤居然生效了。这个lombok就可以正式使用了。
这里我有个疑问,不揍1 和步骤3是有啥区别哇,我不李姐
不管了,现在可以用起来了,还真的挺好用的呢