ibatis-Day01
ibatis学习过程 ibatis的SqlClient通过读取sqlMapConfig信息建立一个Sql客户端,而由于SqlMapConfig中对数据库进行配置,并且加载数据源不同的SqlMap映射文件,因此在ibatisTest中通过SqlClient调用其方法,然后在SqlClient中通过其新建的SqlMap客户端来调用对应的映射文件中的sql语句 SqlMap映射文件 1 <?xml version="1.0" encoding="UTF-8" ?> 2 3 <!DOCTYPE sqlMap 4 PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" 5 "http://ibatis.apache.org/dtd/sql-map-2.dtd"> 6 //命名空间 7 <sqlMap namespace="emp"> 8 9 <!-- Use type aliases to avoid typing the full classname every time. --> //别名 10 <typeAlias alias="emp" type="com.yinhai.ibatisdemo.ibatis.domain.Emp"/> 11 12 <!-- Result maps describe the mapping