mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
* fix issue:#561 增加一个外部参数控制,允许位点不存在时自动重置到当前位点 * Add MariaDB GTID support * 1. fix maven central repository url access error.(Update to https) 2. upgrade spring version to 5.0.5.RELEASE 3. upgrade ibatis to mybatis * fix unit test run error
64 lines
3.6 KiB
XML
64 lines
3.6 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:tx="http://www.springframework.org/schema/tx"
|
|
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:lang="http://www.springframework.org/schema/lang"
|
|
xmlns:context="http://www.springframework.org/schema/context"
|
|
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
|
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
|
|
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd
|
|
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
|
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd"
|
|
default-autowire="byName">
|
|
|
|
<!-- properties -->
|
|
<bean class="com.alibaba.otter.canal.instance.spring.support.PropertyPlaceholderConfigurer" lazy-init="false">
|
|
<property name="ignoreResourceNotFound" value="true" />
|
|
<property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE"/><!-- 允许system覆盖 -->
|
|
<property name="locationNames">
|
|
<list>
|
|
<value>classpath:canal.properties</value>
|
|
<value>classpath:${canal.instance.destination:}/instance.properties</value>
|
|
</list>
|
|
</property>
|
|
</bean>
|
|
|
|
<!-- 基于db的实现 -->
|
|
<bean id="tableMetaTSDB" class="com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta" destroy-method="destory">
|
|
<property name="metaHistoryDAO" ref="metaHistoryDAO"/>
|
|
<property name="metaSnapshotDAO" ref="metaSnapshotDAO"/>
|
|
</bean>
|
|
|
|
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" destroy-method="close">
|
|
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
|
|
<property name="url" value="${canal.instance.tsdb.url:}" />
|
|
<property name="username" value="${canal.instance.tsdb.dbUsername:}" />
|
|
<property name="password" value="${canal.instance.tsdb.dbPassword:}" />
|
|
<property name="maxActive" value="30" />
|
|
<property name="initialSize" value="0" />
|
|
<property name="minIdle" value="1" />
|
|
<property name="maxWait" value="10000" />
|
|
<property name="timeBetweenEvictionRunsMillis" value="60000" />
|
|
<property name="minEvictableIdleTimeMillis" value="300000" />
|
|
<property name="validationQuery" value="SELECT 1" />
|
|
<property name="exceptionSorterClassName" value="com.alibaba.druid.pool.vendor.MySqlExceptionSorter" />
|
|
<property name="validConnectionCheckerClassName" value="com.alibaba.druid.pool.vendor.MySqlValidConnectionChecker" />
|
|
<property name="testWhileIdle" value="true" />
|
|
<property name="testOnBorrow" value="false" />
|
|
<property name="testOnReturn" value="false" />
|
|
<property name="useUnfairLock" value="true" />
|
|
</bean>
|
|
|
|
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
|
|
<property name="dataSource" ref="dataSource"/>
|
|
<property name="configLocation" value="classpath:spring/tsdb/sql-map/sqlmap-config.xml"/>
|
|
</bean>
|
|
|
|
<bean id="metaHistoryDAO" class="com.alibaba.otter.canal.parse.inbound.mysql.tsdb.dao.MetaHistoryDAO">
|
|
<property name="sqlSessionFactory" ref="sqlSessionFactory"/>
|
|
</bean>
|
|
|
|
<bean id="metaSnapshotDAO" class="com.alibaba.otter.canal.parse.inbound.mysql.tsdb.dao.MetaSnapshotDAO">
|
|
<property name="sqlSessionFactory" ref="sqlSessionFactory"/>
|
|
</bean>
|
|
</beans>
|