1.@Data注解:该注解使我们在创建实体类时不需要写get()/set()方法,使得代码简洁
idea还需安装插件,Settings-Plugins-Browse repositories-搜索lombok-install
<!-- maven导入 -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
1.@Data注解:该注解使我们在创建实体类时不需要写get()/set()方法,使得代码简洁
idea还需安装插件,Settings-Plugins-Browse repositories-搜索lombok-install
<!-- maven导入 -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>