Java_Activiti5_菜鸟也来学Activiti5工作流_之与Spring集成(三)

王朝学院·作者佚名  2016-08-27  
宽屏版  字体:  |  |  | 超大  

1<?xmlversion="1.0" encoding="UTF-8"?>2<beansxmlns="http://www.sPRingframework.org/schema/beans"3xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"4xmlns:context="http://www.springframework.org/schema/context"5xmlns:tx="http://www.springframework.org/schema/tx"6xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd7http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd8http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd">910<!--配置数据源-->11<beanid="dataSource"class="org.springframework.jdbc.datasource.SimpleDriverDataSource">12<propertyname="driverClass"value="com.MySQL.jdbc.Driver"/>13<propertyname="url"value="jdbc:mysql://localhost:3306/db_activiti?useUnicode=true&amp;characterEncoding=utf-8"/>14<propertyname="username"value="root"/>15<propertyname="passWord"value="root"/>16</bean>1718<!--配置数据源事务管理器-->19<beanid="transactionManager"class="org.springframework.jdbc.datasource.DataSourceTransactionManager">20<propertyname="dataSource"ref="dataSource"/><!--引用上面的数据源-->21</bean>2223<!--配置流程引擎配置类 注意:这是用 org.activiti.spring.SpringProcessEngineConfiguration 这个类-->24<beanid="processEngineConfiguration"class="org.activiti.spring.SpringProcessEngineConfiguration">25<propertyname="dataSource"ref="dataSource"/>26<propertyname="transactionManager"ref="transactionManager"/>27<propertyname="databaseSchemaUpdate"value="true"/>28<propertyname="jobExecutorActivate"value="false"/>29<propertyname="createDiagramOnDeploy"value="false"/><!--是否生成流程定义图片-->30</bean>3132<!--配置流程引擎工厂-->33<beanid="processEngine"class="org.activiti.spring.ProcessEngineFactoryBean">34<propertyname="processEngineConfiguration"ref="processEngineConfiguration"/>35</bean>3637<!--配置注入一些服务-->38<beanid="repositoryService"factory-bean="processEngine"factory-method="getRepositoryService"/>39<beanid="runtimeService"factory-bean="processEngine"factory-method="getRuntimeService"/>40<beanid="taskService"factory-bean="processEngine"factory-method="getTaskService"/>41<beanid="historyService"factory-bean="processEngine"factory-method="getHistoryService"/>42<beanid="managementService"factory-bean="processEngine"factory-method="getManagementService"/>4344<!--配置activiti的规则-->45<beanid="activitiRule"class="org.activiti.engine.test.ActivitiRule">46<propertyname="processEngine"ref="processEngine"/>47</bean>4849</beans>

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
© 2005- 王朝网络 版权所有