package bean;
import lombok.*;
import java.util.Date;
//get方法
@Getter
//set方法
@Setter
//无参构造
@NoArgsConstructor
//全参构造
@AllArgsConstructor
//toString方法
@ToString
public class User {
private int id;
private String username;
private Date birthday;
private String sex;
private String address;
}
除以上方法外还有
@EqualsAndHashCode:生成equals和hashcode方法等