java - iBatis中SqlMapClientTemplate和SqlMapClient有什么区别
PHP中文网
PHP中文网 2017-04-17 14:58:48
0
1
388

初学iBatis,一直搞不清楚这两者的区别,网上找了一些资料,感觉也是讲的不是很清楚.我知道现在多数在用MyBatis,但是工作当中的框架是这个,虽然不想学,也没办法.
今天遇到一个问题就是,iBatis配置了多个数据源.我不小心将DAO实现类中getSqlMapClientTemplate()写成了getSqlMapClient(),然后调用里面的方法的时候,就发现数据源一直不对,本来应该是去数据源2当中查询的,结果一直跑到数据源一当中.
求大神帮我解释一下两者的区别,感激不尽

PHP中文网
PHP中文网

认证0级讲师

reply all (1)
Peter_Zhu
SQLMAPClientTemplate is the

and SQLMAPClient of SQLMAPClient under ORG.SpringFramework.orm.ibatis. LMAPClient contains the management of session.
SQLMAPClientTemplate Used for session encapsulation and exception capture.
So according to the above inference, you should try to use SqlMapClientTemplate.
Ensure the normality and unity of session and Exception.


http://blog.csdn.net/wxwzy738/article/details/16953609

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!