sqlmap-config.xml 2.03 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="cacheEnabled" value="false" />
		<setting name="multipleResultSetsEnabled" value="true" />
		<setting name="useColumnLabel" value="true" />
		<setting name="useGeneratedKeys" value="false" />
		<setting name="defaultExecutorType" value="SIMPLE" />
		<!-- 开启按需加载 -->
		<setting name="aggressiveLazyLoading" value="false" />
		<!-- 查询时,关闭关联对象即时加载以提高性能 -->
		<setting name="lazyLoadingEnabled" value="true" />
		<setting name="logImpl" value="STDOUT_LOGGING" />
	</settings>

	<!-- 全局别名设置,在映射文件中只需写别名,而不必写出整个类路径 -->
	<typeAliases>
		<typeAlias type="com.b2c.orders.domain.OrderMaxid" alias="orderMaxid" />
		<typeAlias type="com.b2c.orders.domain.OrderLog" alias="OrderLog" />
		<typeAlias type="com.b2c.orders.dao.utils.Query" alias="Query" />
	</typeAliases>

	<typeHandlers>
		<typeHandler handler="com.b2c.orders.dao.utils.OrderStatusTypeHandler"
			javaType="com.b2c.orders.enums.OrderStatus" />
		<typeHandler handler="com.b2c.orders.dao.utils.DeliveryTypeTypeHandler"
			javaType="com.b2c.orders.enums.DeliveryType" />
		<typeHandler handler="com.b2c.orders.dao.utils.ActionTypeHandler"
			javaType="com.b2c.orders.enums.Action" />
		<typeHandler handler="com.b2c.orders.dao.utils.PayStatusTypeHandler"
			javaType="com.b2c.orders.enums.PayStatus" />
		<typeHandler handler="com.b2c.orders.dao.utils.PayTypeTypeHandler"
			javaType="com.b2c.orders.enums.PayType" />
		<typeHandler handler="com.b2c.orders.dao.utils.UserTypeTypeHandler"
			javaType="com.b2c.orders.enums.UserType" />
	</typeHandlers>

	<!-- 映射文件路径 -->
	<mappers>
		<mapper resource="sqlmap/OrderMaxid.xml" />
		<mapper resource="sqlmap/OrderMapper.xml" />
		<mapper resource="sqlmap/OrderLogMapper.xml" />
		<mapper resource="sqlmap/OrderItemMapper.xml" />
	</mappers>


</configuration>