All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jasmine.framework.test.config.springContext.xml Maven / Gradle / Ivy

There is a newer version: 1.3.8
Show newest version
<?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
        https://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context-3.0.xsd">

    <context:property-placeholder location="classpath:/jasmine/framework/test/config/application.properties,
        classpath:/test-config.properties"/>


    <!-- 注册测试相关bean -->
    <bean class="jasmine.framework.test.liquibase.TestDataTaskChange"/>
    <context:component-scan base-package="jasmine.testconfigure"/>
    <!-- 注册测试相关bean -->

    <!-- 测试上下文 -->
    <import resource="classpath:/test-context.xml"/>

    <!-- 数据源 -->
    <bean id="dataSource" class="jasmine.framework.database.impl.datasource.MultipleDataSource" primary="true">
        <property name="defaultTargetDataSource" ref="mainDataSource"/>
    </bean>

    <bean id="mainDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
        <property name="driverClassName" value="${database.driver}"/>
        <property name="url" value="${database.url}"/>
        <property name="username" value="${database.username}"/>
        <property name="password" value="${database.password}"/>
    </bean>

    <!-- 事务管理器 -->
    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
        <property name="dataSource" ref="dataSource"/>
    </bean>

    <!-- 配置Liquibase -->
    <bean id="springLiquibase" class="jasmine.framework.test.liquibase.CustomSpringLiquibase">
        <property name="dataSource" ref="dataSource"/>
        <property name="shouldRun" value="${liquibase.enabled}"/>
        <property name="changeLog" value="classpath:jasmine/framework/test/config/liquibaseMaster.xml"/>
    </bean>
</beans>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy