<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig
PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
"http://www.ibatis.com/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<properties resource="SqlMapConfig.properties" />
http://www.bianshayao.com
http://bianshayao.com
http://www.zhaoshashou.com
http://zhaoshashou.com
http://www.zhaoshashou.com
http://zhaoshashou.com
http://www.tanhuanyao.com
http://tanhuanyao.com
http://www.bianshayao.com
http://bianshayao.com
http://www.goumiyao.com
http://goumiyao.com
<!-- These settings control SqlMap configuration details, primarily to do with transaction
management. They are all optional (see the Developer Guide for more). -->
<settings
cacheModelsEnabled="true" ->是否启用SqlMapClient上的缓存机制,建议为"true"
enhancementEnabled="true" ->提升getter and setter调用效能,降低 反射机制 带来的开销,为 lazyLoading 提升性能
lazyLoadingEnabled="true" ->是否启用延迟加载机制,建议设为"true"
errorTracingEnabled="true" ->是否启用错误日志,在开发期间建议设为"true"
以方便调试
maxRequests="32" ->最大并发请求数(Statement并发数)
maxSessions="10" -> 最大Session数。即当前最大允许的并发 SqlMapClient 数目, maxSessions设定必须介于maxTransactions和maxRequests之间。
maxTransactions="5" ->最大并发事务数
useStatementNamespaces="false" ->此属性配置相当关键。
如果设为true,则映射文件Person.xml中的<sqlMap namespace="Person">下所有操作如 <select><update><insert><delete>标签中的id属性必须为"Person.xxx",
简单起见,可以设为false,id可简写为"xxx",也表明从属于Person这个namespace
/>
<!-- Configure a datasource to use with this SQL Map using SimpleDataSource.
Notice the use of the properties from the above resource -->
<transactionManager type="JDBC" >
<dataSource type="SIMPLE">
<property name="JDBC.Driver" value="${driver}"/>
<property name="JDBC.ConnectionURL" value="${url}"/>
<property name="JDBC.Username" value="${username}"/>
<property name="JDBC.Password" value="${password}"/>
</dataSource>
</transactionManager>
<sqlMap resource="Person.xml" />
</sqlMapConfig>