1.工程目录结构
2.需要导入的jar包
除了和外,其他的都是mybatis的核心包,直接可以在官网下载。
3.具体程序
package com.bjpowernode.beans; public class Student { private Integer id; private String name; private int age; private double score; public Student() { super(); // TODO Auto-generated constructor stub } public Student(String name, int age, double score) { super(); this.name = name; this.age = age; this.score = score; } 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 int getAge() { return age; } public void setAge(int age) { this.age = age; } public double getScore() { return score; } public void setScore(double score) { this.score = score; } @Override public String toString() { return "Student [name=" + name + ", age=" + age + ", score=" + score + "]"; } }