ibatis3 配置文件实例
来源:互联网 发布:pls tower 软件 编辑:程序博客网 时间:2024/05/22 14:55
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration PUBLIC "-//ibatis.apache.org//DTD Confi
g 3.0//EN"
"http://ibatis.apache.org/dtd/ibatis-3-config.dtd">
<configuration>
<properties resource="database.properties">
</properties>
<settings>
<setting name="cacheEnabled" value="true"/>
<setting name="lazyLoadingEnabled" value="true"/>
<setting name="multipleResultSetsEnabled" value="true"/>
<setting name="useGeneratedKeys" value="false"/>
<!-- <setting name="enhancementEnabled" value="false"/>-->
<setting name="defaultExecutorType" value="SIMPLE"/>
<setting name="defaultStatementTimeout" value="25000"/>
</settings>
<typeAliases>
<typeAlias type="com.ibatis.Student" alias="student" />
</typeAliases>
<typeHandlers>
<typeHandler handler="com.ibatis.ExampleTypeHandler" jdbcType="VARCHAR" javaType="String"/>
<!--这样会覆盖原来ibatis默认的string varchar转换器-->
</typeHandlers>
<!--ibatis使用objectFactory去创建result object的实例对象 -->
<objectFactory type="com.ibatis.ExampleObjectFactory">
<property name="" value=""/>
</objectFactory>
<!--ibatis允许插件截断以下方法调用
Executor(update,query,flushStatements,commit,rollback,getTransaction,close,isClosed)
ParameterHandler(getParameterObject,setParameters)
ResultSetHandler(handleResultSets,handleOutputParameters)
StatementHandler(prepare,parameterize,batch,update,query)
必须在理解这些方法的基础上很小心的使用插件,不然很容易破坏ibatis的核心 -->
<plugins>
<plugin interceptor="com.ibatis.ExamplePlugin">
<property name="" value=""/>
</plugin>
</plugins>
<environments default="development">
<environment id="development">
<!--事务控制类型
JDBC:根据jdbc控制事务的提交和回滚
MANAGED:将事务控制转交给容器
-->
<transactionManager type="JDBC" />
<!--数据源类型:
1.UNPOOLED:不使用池技术,在请求到来时直接打开或者关闭数据库连接
必须配置的参数:driver、url、username、password
可选参数:使用driver.xxx来配置,如:driver.encoding=UTF8
-->
<dataSource type="UNPOOLED">
<property name="driver" value="${driver}" />
<property name="url" value="${url}" />
<property name="username" value="${username}" />
<property name="password" value="${password}" />
</dataSource>
<!--2.POOLED:使用数据库连接池
<dataSource type="POOLED">
<property name="poolMaximumActiveConnections" value="10"/>
<property name="poolMaximumIdleConnections" value=""/>
<property name="poolMaximumCheckoutTime" value="20000"/>
<property name="poolTimeToWait" value="20000"/>
<property name="poolPingQuery" value="NO PING QUERY SET"/>
<property name="poolPingEnabled" value="false"/>
<property name="poolPingConnectionsNotUsedFor" value="0"/>
</dataSource>
-->
<!--3.JNDI 使用env.xxx配置可选参数,如:env.encoding=UTF8
<dataSource type="JNDI">
<property name="initial_context" value=""/>
<property name="data_source" value=""/>
</dataSource>
-->
</environment>
</environments>
<mappers>
<mapper resource="studentSqlMapper.xml" />
<!-- <mapper url="file:///var/sqlmaps/AuthorMapper.xml"/>-->
</mappers>
</configuration>
- ibatis3 配置文件实例
- Ibatis3 mapper配置文件实例
- ibatis3
- iBatis3尝鲜
- ibatis3整合spring
- Ibatis3入门学习
- 集成iBATIS3和bonecp
- ibatis3整合spring
- iBatis3架构分析
- iBatis3架构分析
- ibatis3.0配置
- ibatis3的下载地址
- 测试ibatis3连接数据
- Spring的配置文件实例
- nginx 配置文件实例
- properties配置文件操作实例
- bind9配置文件实例
- java 读配置文件实例
- 2010.6.30更新 卡巴斯基注册 key 免费下载
- 观察者模式(observer pattern)(订报)
- CentOS5.4安装图解
- 利用反射遍历一个POJO对象的各个字段名及属性。。。
- JAVA集合类
- ibatis3 配置文件实例
- 对日外包项目管理十日谈 之 第一日 接活
- vi junior use
- 对日外包项目管理十日谈 之 第二日 计划
- CentOS5.4安装oracle11G
- vi useful website
- 视频采集---MPEG4压缩实现
- 设置默认浏览器
- svn在linux下的使用