标签:springmvc html5 bootstrap mybatis shiro
/**
* Created by baixiaobin
*/
public class User {
private final int id;
private final String name;
private final String sex;
private final String des;
public int getId() {
return id;
}
public String getName() {
return name;
}
public String getSex() {
return sex;
}
public String getDes() {
return des;
}
public static class Builder {
private final int id;
private final String name;
private String sex;
private String des;
public User build() { 下载
return new User(this);
}
/**
* id 主键id
* name 名称
*/
public Builder(int id, String name) {
this.id = id;
this.name = name;
}
public Builder sex(String sex) {
this.sex = sex;
return this;
}
public Builder des(String des) {
this.des = des;
return this;
}
}
private User(Builder builder) {
this.id = builder.id;
this.name = builder.name;
this.des = builder.des;
this.sex = builder.sex;
}
}
标签:springmvc html5 bootstrap mybatis shiro
原文地址:http://12308921.blog.51cto.com/12298921/1874134