<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:context="http://www.springframework.org/schema/context"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">

	<context:component-scan base-package="com.baomidou.mybatisplus.test.plugins" />

	<import resource="classpath:spring/spring-jdbc.xml" />

	<!-- MyBatis SqlSessionFactoryBean 配置 -->
	<bean id="sqlSessionFactory"
		class="com.baomidou.mybatisplus.spring.MybatisSqlSessionFactoryBean">
		<property name="dataSource" ref="dataSource" />
		<property name="typeAliasesPackage" value="com.baomidou.mybatisplus.test.mysql.paginationInterceptor.entity" />
		<property name="plugins">
			<array>
				<bean class="com.baomidou.mybatisplus.plugins.PerformanceInterceptor" />
				<bean class="com.baomidou.mybatisplus.plugins.PaginationInterceptor"/>
			</array>
		</property>
	</bean>

	<bean id="sqlSessionTemplate" class="org.mybatis.spring.SqlSessionTemplate">
		<constructor-arg index="0" ref="sqlSessionFactory" />
	</bean>

	<bean id="mapperScannerConfigurer" class="org.mybatis.spring.mapper.MapperScannerConfigurer">
		<property name="basePackage" value="com.baomidou.mybatisplus.test.mysql.paginationInterceptor.mapper" />
	</bean>
</beans>
