赞
踩
重点: 安装好插件记得重启,重启才能生效
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.8</version>
<scope>provided</scope>
</dependency>
对应代码:
package com.qf.fresheveryday.entity; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; @Data//set、get方法 @AllArgsConstructor//所有的含参构造,但没有无参构造 @NoArgsConstructor//无参构造 public class User implements Serializable { private Integer id; private String usernmae; private String password; private String email; private String registTime; private Integer state; }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。