编程(Java-iBatis)
May 16

itlife365.com网上收集的iBATIS各版本比较分享

因为ibatis前后版本差别比较大,便决定把iBATIS三个版本的一些改动的地方罗列出来对比一下, 方便以后查阅, 也用于警醒自己.具体如下:

sqlMapConfig.xml 中的异同.

iBATIS_v1

iBATIS_v2

iBATIS_v3

DOCTYPE

sql-map-config.dtd

sql-map-config-2.dtd

ibatis-3-config.dtd

configuration标签

sqlMap标签

sqlMap 映射中的异同

iBATIS_v1

iBATIS_v2

iBATIS_v3

DOCTYPE

sql-map.dtd

sql-map-2.dtd

ibatis-3-mapper.dtd

sqlMap标签

statement标签

</>…

参数表示

#id#

#id#

#{id}

sqlMap API的异同

iBATIS_v1

iBATIS_v2

iBATIS_v3

执行对象

SqlMap

SqlMapClient

SqlSession

得到执行

XMLSqlMapBuilder->

builderSqlMap

SqlMapClientBuilder->

builderSqlMap

SqlSessionFactory->

openSession

执行

excuteQueryForObject

queryForObject..

queryForList…

update…

selectOne…

selectList…

update…

三个版本的部分对比, 暂时完成但是 ........, iBATIS 怎么就变成了 MyBatis … 看了一下官方的文档, 貌似跟iBATIS_v3相差不是很大. 但愿, 以后改版的时候, 文档中可以细心的提醒一下, 新版跟旧版的差别, 或者做干脆/一点, 能够兼容旧的版本就更好了

各个历史的版本查看这里:http://archive.apache.org/dist/ibatis/binaries/ibatis.java/

---下载的ibatis-2.3.4.726.zip文件中查看ibatis依赖的架包说明:

jar-dependencies.txt

JAR File Dependencies

---------------------

iBATIS 2.0 requires JDK 1.4

All other libraries and JAR files are completely optional. Here's

a summary of those libraries and when you need to use them.  The versions

listed here are simply the version tested.  Higher versions may or may not 

work.

  * If you want to use bytecode enhancement for advanced lazy loading:

      CGLIB 2.0              (http://cglib.sf.net)

  * If you want to use the Jakarta DBCP connection pool you'll need:

      DBCP 1.1               (http://jakarta.apache.org/commons/dbcp/)

  * If you want to use distributed caching you'll need:

      OSCache 2.0.1          (http://www.opensymphony.com/oscache/)


  * If you want to use advanced logging you'll need one or both of the following:


      Commons Logging        (http://jakarta.apache.org/commons/)

      Log4J 1.2.8            (http://logging.apache.org/log4j/docs/)

That's it!

----end by itlife365.com

Tags: ,
分页: 1/1 第一页 1 最后页 [ 显示模式: 摘要 | 列表 ]