mybatis-config.xml 3.3 KB
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
	
	<settings>
		<setting name="logImpl" value="LOG4J"/> 
        <!-- 全局映射器启用缓存 -->  
        <setting name="cacheEnabled" value="true" />
        <!-- 全局启用或禁用延迟加载 -->
        <setting name="lazyLoadingEnabled" value="true" />
        <!-- 允许使用自定义的主键值(比如由程序生成的UUID 32位编码作为键值),数据表的PK生成策略将被覆盖 -->
        <setting name="useGeneratedKeys" value="true" />
        <!-- 配置默认的执行器 -->
        <setting name="defaultExecutorType" value="REUSE" />
        <!-- 设置关联对象加载的形态,此处为按需加载字段(加载字段由SQL指定),不会加载关联表的所有字段,以提高性能 -->
        <setting name="aggressiveLazyLoading" value="false" />
        <!-- 对于未知的SQL查询,允许返回不同的结果集以达到通用的效果 -->
        <setting name="multipleResultSetsEnabled" value="true"/>
        <!-- 允许使用列标签代替列名 -->
        <setting name="useColumnLabel" value="true"/>
        <!-- value:BATCH 对于批量更新操作缓存SQL以提高性能  -->
        <setting name="defaultExecutorType" value="SIMPLE"/>
        <!-- 数据库超过25000秒仍未响应则超时 -->
        <setting name="defaultStatementTimeout" value="25"/>
        <setting name="lazyLoadTriggerMethods" value="equals,clone,hashCode,toString" /> 
    </settings>
    <!-- 命名空间 -->
    <typeAliases>
         <typeAlias alias="ServerConfigBean" type="com.sibu.orderHelper.api.model.ServerConfigBean"/>
         <typeAlias alias="IMCategoryBean" type="com.sibu.orderHelper.integral.model.IMCategoryBean"/>
         <typeAlias alias="IMProductBean" type="com.sibu.orderHelper.integral.model.IMAPIProductBean"/>
         <typeAlias alias="IMDoingOrderBean" type="com.sibu.orderHelper.integral.model.IMDoingOrderBean"/>
         <typeAlias alias="IMDoingOrder1Bean" type="com.sibu.orderHelper.integral.model.IMDoingOrder1Bean"/>
         <typeAlias alias="IMProductCommentBean" type="com.sibu.orderHelper.integral.model.IMProductCommentBean"/>
         <typeAlias alias="IMAdvertBean" type="com.sibu.orderHelper.integral.model.IMAdvertBean"/>
         <typeAlias alias="IMProductConfigureBean" type="com.sibu.orderHelper.integral.model.IMProductConfigureBean"/>
         <typeAlias alias="IMDoingOrderCommentBean" type="com.sibu.orderHelper.integral.model.IMDoingOrderCommentBean"/>
         <typeAlias alias="IMOrderRefundBean" type="com.sibu.orderHelper.integral.model.IMOrderRefundBean"/>
         <typeAlias alias="RefundOrderResponse" type="com.sibu.orderHelper.integral.reponse.RefundOrderResponse"/>
         <typeAlias alias="IMCampaignCategoryBean" type="com.sibu.orderHelper.integral.model.IMCampaignCategoryBean"/>
         <typeAlias alias="IMMemberCollectBean" type="com.sibu.orderHelper.integral.model.IMMemberCollectBean"/>
    </typeAliases>
 
    <!-- 映射map,这里在spring-mybatis.xml配置的扫描,如果不用扫描,则需要在这里配置 -->
    <mappers>
    	<!-- <mapper resource="classpath:mapper/UserMapper.xml" />  -->
    </mappers>
</configuration>