61 lines
3.0 KiB
XML
61 lines
3.0 KiB
XML
<?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"
|
|
xmlns:aop="http://www.springframework.org/schema/aop"
|
|
xmlns:p="http://www.springframework.org/schema/p"
|
|
xmlns:tx="http://www.springframework.org/schema/tx"
|
|
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
|
|
http://www.springframework.org/schema/tx
|
|
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
|
|
http://www.springframework.org/schema/aop
|
|
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
|
|
|
|
<!--SourceData -->
|
|
<bean id="dataSourceOne" class="org.apache.commons.dbcp.BasicDataSource"
|
|
destroy-method="close">
|
|
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
|
|
<property name="url"
|
|
value="jdbc:mysql://172.16.128.29:3306/extract_result?characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true" />
|
|
<property name="username" value="gather" />
|
|
<property name="password" value="influx1234" />
|
|
<property name="validationQuery" value="SELECT 1" />
|
|
<property name="testOnBorrow" value="true"/>
|
|
</bean>
|
|
<bean id="sqlSessionFactoryOne" class="org.mybatis.spring.SqlSessionFactoryBean">
|
|
<property name="dataSource" ref="dataSourceOne" />
|
|
</bean>
|
|
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
|
|
<property name="basePackage" value="org.ossean.gather.sourceDao" />
|
|
<property name="sqlSessionFactory" ref="sqlSessionFactoryOne"></property>
|
|
</bean>
|
|
|
|
|
|
<!--DestData -->
|
|
<bean id="dataSourceTwo" class="org.apache.commons.dbcp.BasicDataSource"
|
|
destroy-method="close">
|
|
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
|
|
<property name="url"
|
|
value="jdbc:mysql://172.16.128.30:3306/ossean_production?characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true" />
|
|
<property name="username" value="gather" />
|
|
<property name="password" value="influx1234" />
|
|
<property name="validationQuery" value="SELECT 1" />
|
|
<property name="testOnBorrow" value="true"/>
|
|
</bean>
|
|
<bean id="sqlSessionFactoryTwo" class="org.mybatis.spring.SqlSessionFactoryBean">
|
|
<property name="dataSource" ref="dataSourceTwo" />
|
|
</bean>
|
|
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
|
|
<property name="basePackage" value="org.ossean.gather.targetDao" />
|
|
<property name="sqlSessionFactory" ref="sqlSessionFactoryTwo"></property>
|
|
</bean>
|
|
|
|
<tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true"/>
|
|
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
|
<property name="dataSource" ref="dataSourceOne" />
|
|
</bean>
|
|
|
|
</beans> |