官网: https://github.com/mybatis
中文网:http://www.mybatis.org/mybatis-3/zh/index.html
1.项目文件构架:
2.导包:
1. mybatis包,在官网上可以下载 2. jdbc 包
3. model类:
@JAVA
package com.zhiyou100.model;
public class User {
private Long id;
private String username;
private String password;
private String email;
public User() {
super();
}
public User(Long id, String username, String password, String email) {
super();
this.id = id;
this.username = username;
this.password = password;
this.email = email;
}
@Override
public String toString() {
return "User [id=" + id + ", username=" + username + ", password=" + password + ", email=" + email + "]";
}
public