<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"> <tx:annotation-driven proxy-target-class="true"/> <bean id="dataSource" class="com.casic.core.jdbc.DataSourceFactoryBean"> <property name="properties" ref="applicationProperties"/> </bean> <!--<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate"> <property name="dataSource" ref="dataSource" /> </bean>--> <!--test flyway--> <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate" depends-on="databaseMigrator"> <property name="dataSource" ref="dataSource" /> </bean> <bean id="databaseMigrator" class="com.casic.core.dbmigrate.DatabaseMigrator"> <property name="dataSource" ref="dataSource"/> <property name="applicationProperties" ref="applicationProperties"/> </bean> </beans>