123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?xml version="1.0" encoding="UTF-8"?>
- <beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:context="http://www.springframework.org/schema/context"
- 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-4.0.xsd
- http://www.springframework.org/schema/tx
- http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
- http://www.springframework.org/schema/aop
- http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context-4.0.xsd">
- <!-- 单例json对象 -->
- <bean id="objectMapper" class="com.fasterxml.jackson.databind.ObjectMapper" />
- <!-- 数据源的配置 -->
- <bean id="activitiDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
- <property name="user" value="${activitiUser}" />
- <property name="password" value="${activitiPassword}" />
- <property name="jdbcUrl" value="${activitiUrl}" />
- <property name="driverClass" value="${activitiDriver}" />
- </bean>
- <!-- 事物管理的配置 -->
- <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="activitiDataSource"/>
- </bean>
- <!-- 注册一个流程引擎配置对象 -->
- <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
- <!-- 数据库连接池信息 -->
- <property name="dataSource" ref="activitiDataSource" />
- <property name="databaseType" value="${activitiDialect}" />
- <!-- 注入自动建表类型 -->
- <property name="databaseSchemaUpdate" value="true" />
- <!-- 事务管理器 -->
- <property name="transactionManager" ref="transactionManager" />
- <!-- 禁用身份模块的功能 不使用activiti中的用户也角色,使用投诉系统自带的-->
- <property name="dbIdentityUsed" value="true" />
- <!-- 部署方式 自动部署 -->
- <property name="deploymentMode" value="single-resource" />
- <!-- 部署文件 -->
- <property name="deploymentResources" value="/WEB-INF/flow/*.bpmn" />
- <!-- 防止生成的图片汉字乱码 -->
- <property name="activityFontName" value="宋体" />
- <property name="labelFontName" value="宋体" />
- <!-- 定时任务 -->
- <property name="jobExecutorActivate" value="true" />
- <!-- 解决Oracle中表空间中,存在多个activiti数据的错误 提示找不到表的问题请打开此注释 或者执行drop sequence act_evt_log_seq-->
- <!-- <property name="databaseSchema" value="ACTIVITI"></property> -->
- </bean>
-
-
- <!-- 注册一个流程引擎对象,通过一个流程引擎工厂bean创建 -->
- <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
- <!-- 注入流程引擎配置对象 -->
- <property name="processEngineConfiguration" ref="processEngineConfiguration" />
- </bean>
-
- <!-- 注册activiti中用到的Service对象,其实这里面用到了门面模式,通过门面模式去获得他们各自想要的 -->
- <bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
- <bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" />
- <bean id="formService" factory-bean="processEngine" factory-method="getFormService" />
- <bean id="identityService" factory-bean="processEngine" factory-method="getIdentityService" />
- <bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
- <bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
- <bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" />
- </beans>
|