sqlmapconfig.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<settings
cacheModelsEnabled="true"
enhancementEnabled="true"
lazyLoadingEnabled="true"
useStatementNamespaces="false" />
<transactionManager type="JDBC">
<dataSource type="SIMPLE">
<property name="JDBC.Driver" value="org.gjt.mm.mysql.Driver" />
<property name="JDBC.ConnectionURL" value="jdbc:mysql://localhost:3306/mydb" />
<property name="JDBC.Username" value="root" />
<property name="JDBC.Password" value="wwl" />
</dataSource>
</transactionManager>
<sqlMap resource="/sqlmap/User.xml" />
</sqlMapConfig>
sqlmap.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="....">
<resultMap id="..." class="...">
</resultMap>
<select .....>
</select>
</sqlMap>