1.安装lombok插件
file->setting->plugins->lombok
2.在pom.xml中添加lombok的相关依赖
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.2</version>
<scope>provided</scope>
</dependency>
参考:https://blog.csdn.net/qq_20552525/article/details/82998936