<?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.xsd
                        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
 	
 	<!-- DW(SIG) DB -->
    <bean id="sqlSession" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource" />
        <property name="mapperLocations" value="classpath:conf/mappers/main.xml" />
    </bean>
     
    <bean id="sqlSessionTemplate" class="org.mybatis.spring.SqlSessionTemplate" destroy-method="clearCache">
        <constructor-arg index="0" ref="sqlSession"/>
    </bean>
    
    <!-- UTISADMIN DB -->
    <bean id="sqlSession_admin" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource_admin" />
        <property name="mapperLocations" value="classpath:conf/mappers/admin.xml" />
    </bean>
     
    <bean id="sqlSessionTemplate_admin" class="org.mybatis.spring.SqlSessionTemplate" destroy-method="clearCache">
        <constructor-arg index="0" ref="sqlSession_admin"/>
    </bean>
    
    <bean id="adminScanner" class="org.mybatis.spring.mapper.MapperScannerConfigurer"> 
    	<property name="basePackage" value="com.siginfo.dao.AdminDao" />
    </bean>
    
    <!-- DW(SIGOPEN) DB -->
    <bean id="sqlSession_sigopen" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource_sigopen" />
        <property name="mapperLocations" value="classpath:conf/mappers/sigopen.xml" />
    </bean>
     
    <bean id="sqlSessionTemplate_sigopen" class="org.mybatis.spring.SqlSessionTemplate" destroy-method="clearCache">
        <constructor-arg index="0" ref="sqlSession_sigopen"/>
    </bean>
    
    <bean id="sigoepnScanner" class="org.mybatis.spring.mapper.MapperScannerConfigurer"> 
    	<property name="basePackage" value="com.siginfo.dao.SigopenDao" />
    </bean>
    
    <!-- 트랜잭션 관리를 위한 bean --> 
	<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
	      <property name="dataSource" ref="dataSource" />
	</bean>
	
</beans>