Commit ee2241bb authored by neo's avatar neo

[dev] use same datasource with api

parent fbe5c2bc
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" <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:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd <import resource="applicationContext-datasource.xml"/>
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd">
<bean id="datasourceWorkflow" class="com.alibaba.druid.pool.DruidDataSource">
<property name="url" value="${workflow_jdbc_url}" />
<property name="username" value="${workflow_jdbc_user}" />
<property name="password" value="${workflow_jdbc_password}" />
</bean>
<bean id="transactionManagerWorkflow" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <bean id="transactionManagerWorkflow" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="datasourceWorkflow" /> <property name="dataSource" ref="dataSource"/>
</bean> </bean>
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration"> <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="dataSource" ref="datasourceWorkflow" /> <property name="dataSource" ref="dataSource"/>
<property name="transactionManager" ref="transactionManagerWorkflow" /> <property name="transactionManager" ref="transactionManagerWorkflow"/>
<property name="databaseSchemaUpdate" value="true" /> <property name="databaseSchemaUpdate" value="true"/>
<property name="jobExecutorActivate" value="true" /> <property name="jobExecutorActivate" value="true"/>
<!-- 以下2个是为了防止生成流程图片时出现乱码 --> <!-- 以下2个是为了防止生成流程图片时出现乱码 -->
<property name="activityFontName" value="宋体"/> <property name="activityFontName" value="宋体"/>
<property name="labelFontName" value="宋体"/> <property name="labelFontName" value="宋体"/>
...@@ -28,20 +20,20 @@ http://www.springframework.org/schema/tx http://www.springframework.org/schema/t ...@@ -28,20 +20,20 @@ http://www.springframework.org/schema/tx http://www.springframework.org/schema/t
<!-- 流程引擎 --> <!-- 流程引擎 -->
<bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean"> <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
<property name="processEngineConfiguration" ref="processEngineConfiguration" /> <property name="processEngineConfiguration" ref="processEngineConfiguration"/>
</bean> </bean>
<!-- 流程服务 --> <!-- 流程服务 -->
<bean id="repositoryService" factory-bean="processEngine" <bean id="repositoryService" factory-bean="processEngine"
factory-method="getRepositoryService" /> factory-method="getRepositoryService"/>
<bean id="runtimeService" factory-bean="processEngine" <bean id="runtimeService" factory-bean="processEngine"
factory-method="getRuntimeService" /> factory-method="getRuntimeService"/>
<bean id="taskService" factory-bean="processEngine" <bean id="taskService" factory-bean="processEngine"
factory-method="getTaskService" /> factory-method="getTaskService"/>
<bean id="historyService" factory-bean="processEngine" <bean id="historyService" factory-bean="processEngine"
factory-method="getHistoryService" /> factory-method="getHistoryService"/>
<bean id="managementService" factory-bean="processEngine" <bean id="managementService" factory-bean="processEngine"
factory-method="getManagementService" /> factory-method="getManagementService"/>
<bean id="IdentityService" factory-bean="processEngine" <bean id="IdentityService" factory-bean="processEngine"
factory-method="getIdentityService" /> factory-method="getIdentityService"/>
</beans> </beans>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment