<?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:p="http://www.springframework.org/schema/p"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd">
    <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource"
        init-method="init" 
        destroy-method="close" 
        p:url="${db.url}"
        p:username="${db.user}" 
        p:password="${db.password}" 
        p:maxActive="16" />
    <!-- MyBatis SqlSessionFactory -->
    <bean id="sqlSessionFactory"
        class="me.chyxion.tigon.mybatis.TigonSqlSessionFactoryBean"
        p:dataSource-ref="dataSource"
        p:mapperLocations="classpath*:mybatis/mappers/*-mapper.xml" />
    <!-- MyBatis Mappers Auto Scan -->
    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"
        p:basePackage="me.chyxion.tigon.mybatis.test.mapper"
        p:sqlSessionFactoryBeanName="sqlSessionFactory" />
</beans>
