mybatis
一、 入门开发步骤
1.导入相关jar包
mybatis3.4.2核心开发包
asm-5.1.jar
cglib-3.2.4.jar
commons-logging-1.1.3.jar
log4j-1.2.17.jar
mybatis-3.4.2.jar
mysql驱动包
mysql-connector-java-5.1.7-bin.jar
2.定义实体及实体映射文件
定义member实体
package com.eggtwo.entity; import java.math.BigDecimal; import java.util.Date; public class Member { private int id; public int getId() { return id; } public void setId(int id) { this.id = id; } private String name; private int age; private Date birthday; private boolean man; private BigDecimal score; public BigDecimal getScore() { return score; } public void setScore(BigDecimal score) { this.score = score; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public Date getBirthday() { return birthday; } public void setBirthday(Date birthday) { this.birthday = birthday; } public boolean isMan() { return man; } public void setMan(boolean man) { this.man = man; } }