一、项目构建

1、Java项目目录结构

Mybatis注解开发相关

 

 2、在domain包下创建User实体类

package sun.domain;

import java.io.Serializable;
import java.util.Date;

/**
 * @Classname User
 * @Description TODO
 * @Date 2020/9/13 14:07
 * @Created by Administrator
 */
public class User implements Serializable {
    private Integer id;
    private String username;
    private String address;
    private String sex;
    private Date birthday;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", address='" + address + '\'' +
                ", sex='" + sex + '\'' +
                ", birthday=" + birthday +
                '}';
    }
}
User实体类

相关文章:

  • 2022-12-23
  • 2021-07-17
  • 2021-10-08
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-25
  • 2021-08-13
  • 2021-06-05
  • 2022-12-23
相关资源
相似解决方案