ibatis2.x学习实战
1.到谷歌下载ibatis2.x 包 http://code.google.com/p/mybatis/downloads/detail?name=ibatis-2.3.4.726.zip&can=4&q=
2.打开ibatis-2.3.4.726文件夹
3.使用simple_example代码
4.快速构建自己的工程 (我这里使用myeclipse6.5)
测试是否成功?
package ibatistest;
import java.sql.SQLException;
import com.mydomain.data.SimpleExample;
import com.mydomain.domain.Account;
public class Test {
public static void main(String[] args) throws SQLException {
Account account = SimpleExample.selectAccountById(2125);
System.out.println(account.getEmail());
}
}
成功获取email,OK.
附件有代码下载 ibatis2x.rar