Mybatis中helloworld例子
1.helloworld例子:
做一个普通的java project:
例 1.1
package com;
public class Register {
public String toString() {
return "id:"+id+"\nname:"+name+"\nage:"+age;
}
private Integer id;
private String name;
private Integer age;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name ;
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
}
package com.mapper;
import com.Register;
public interface RegisterMapper {
Register selectByPrimaryKey(Integer id);
}
更多内容请见原文,原文转载自:https://blog.csdn.net/qq_44639795/article/details/100056101