Ibatis is another o / r mapping solution, J2EE's O / R scheme is much more, compared with Hibernate, iBATIS is small, it is very fast. If you don't need too much complex feature, iBATIS is the easiest solution to meet your requirements and flexible solutions. The biggest feature of IBATIS is simple, the latest version 2.0 (download), compared with 1.0, mainly modified on the XML configuration file, but as long as there is SQL foundation, I believe that you can see it without tutorial. Let's take a look at a simplest example. We first build a table Account, including the field username, varchar (20), PK, and Password, Varchar (20), where some data is filled in. Then write IBATI must have the configuration file SQL-MAP-Config.xml, the file name is free, the content is as follows: XML Version = "1.0" Encoding = "UTF-8"?>
Then note that this profile also references an account.xml, it's right, iBatis associates each Java object that requires o / r mapping to an XML configuration file, we need to map an Account table to an Account class: package eXample ; public class Account {private String username; private String password; public String getUsername () {return username;} public void setUsername (String username) {this.username = username;} public String getPassword () {return password;} public void SetPassword (String password) {this.password = password;}} Written an Account.xml file: XML Version = "1.0" encoding = "UTF-8"?>