spring解析小點彙總

spring 中有一個類叫
org.springframework.orm.ibatis.SqlMapClientFactoryBean
配置如下
<bean id="sqlMapClient"
class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation">
<description>
iBATIS SQL Mapping配置文件名,系統要能夠在CLASSPATH中找到該文件
</description>
<value>sqlmap-config.xml</value>
</property>
</bean>

而在sqlmap-config.xml中則是存放其它的需要的配置文件資源
<?xml version="1.0" encoding="GB2312"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
"http://www.ibatis.com/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<settings cacheModelsEnabled="true"
enhancementEnabled="false"
lazyLoadingEnabled="false"
maxRequests="3000"
maxSessions="3000"
maxTransactions="3000"
useStatementNamespaces="false"/>
<sqlMap resource="sqlmap-mapping-mailmanage.xml"/>
</sqlMapConfig>
使用的時候,我們只要繼承SqlMapClientDaoSupport
那麼.就可以在代碼中.
getSqlMapClientTemplate().queryForList(sqlStmID,param);
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章