iBatis三个版本的区别
iBATIS_v1
iBATIS_v2
iBATIS_v3
DOCTYPE
sql-map-config.dtd
sql-map-config-2.dtd
ibatis-3-config.dtd
configuration标签
<sql-map-config>
</sql-map-config>
<sqlMapConfig>
</sqlMapConfig>
<configuration>
</configuration>
sqlMap标签
<sql-map recource../>
<sqlMap recource../>
<mappers>
<mapper recource.. />
</mappers>
iBATIS_v1
iBATIS_v2
iBATIS_v3
DOCTYPE
sql-map.dtd
sql-map-2.dtd
ibatis-3-mapper.dtd
sqlMap标签
<sql-map>
</sql-map>
<sqlMap>
</sqlMap>
<mapper>
</mapper>
statement标签
<mapped-statement>
</mapped-statement>
<select></select>
<update></update>
<statement></>…
<select></select>
<update></update>
参数表示
#id#
#id#
#{id}
iBATIS_v1
iBATIS_v2
iBATIS_v3
执行对象
SqlMap
SqlMapClient
SqlSession
得到执行
XMLSqlMapBuilder->
builderSqlMap
SqlMapClientBuilder->
builderSqlMap
SqlSessionFactory->
openSession
执行
excuteQueryForObject
queryForObject..
queryForList…
update…
selectOne…
selectList…
update…