spring+ibatis整合方法
1、spring配置文件中增加以下代码
<beanid="sqlMapClient"class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<propertyname="configLocation"value="classpath:conf/ibatis/sqlmap-config.xml"/>
<propertyname="dataSource"ref="dataSource"/>
</bean>
<beanid="xxxxx"class="xxxxxx">
<propertyname="sqlMapClient"ref="sqlMapClient"/>
</bean>
2、ibatis配置文件sqlmap-config.xml中引入具体的ibatis配置文件即可
<sqlMapresource="conf/ibatis/ibatis.xxx.xml"/>
3、所有dao类都继承com.ibatis.sqlmap.client.SqlMapClient
相关推荐
Dullonjiang 2020-01-23
与卿画眉共浮生 2011-06-25
yierxiansheng 2014-06-18
登峰小蚁 2019-12-24
plane 2017-10-19
踩风火轮的乌龟 2019-10-23
pandapanda 2014-05-08
阿泰 2014-07-02
shouen 2016-04-26
whileinsist 2012-04-07
spprogrammer 2018-01-25
Coohx 2017-12-05
AndroidOliver 2012-05-14
BruceWayne 2014-12-02
liubang000 2014-05-30
KOJ 2013-11-26
CXC0 2013-08-28