spring-context-activiti.xml
3.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?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" xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-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/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd" default-lazy-init="true">
<description>Activiti Configuration</description>
<!-- 加载配置属性文件 -->
<context:property-placeholder ignore-unresolvable="true" location="classpath:jeesite.properties" />
<!-- Activiti begin -->
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="dataSource" ref="dataSource" />
<property name="transactionManager" ref="transactionManager" />
<property name="deploymentResources" value="classpath*:/act/deployments/**/*.bar"/><!-- 自动部署 -->
<property name="databaseSchemaUpdate" value="true" /><!-- 自动建表,自动更新表结构 -->
<property name="jobExecutorActivate" value="true" /><!-- 该参数将启用定时相关的功能 -->
<property name="history" value="full" /><!-- 历史记录保存模式 -->
<!-- UUID作为主键生成策略 -->
<property name="idGenerator" ref="idGen" />
<!-- 生成流程图的字体 -->
<property name="activityFontName" value="${activiti.diagram.activityFontName}"/>
<property name="labelFontName" value="${activiti.diagram.labelFontName}"/>
<property name="annotationFontName" value="${activiti.diagram.annotationFontName}"/><!-- 5.21.0 新增参数 -->
<!-- 自定义用户权限 ,必须重新实现用户和组的相应方法-->
<property name="customSessionFactories">
<list>
<bean class="com.thinkgem.jeesite.modules.act.service.ext.ActUserEntityServiceFactory"/>
<bean class="com.thinkgem.jeesite.modules.act.service.ext.ActGroupEntityServiceFactory"/>
</list>
</property>
</bean>
<bean id="processEngineFactory" class="org.activiti.spring.ProcessEngineFactoryBean">
<property name="processEngineConfiguration" ref="processEngineConfiguration" />
</bean>
<bean id="processEngine" factory-bean="processEngineFactory" factory-method="getObject" />
<bean id="repositoryService" factory-bean="processEngineFactory" factory-method="getRepositoryService" />
<bean id="runtimeService" factory-bean="processEngineFactory" factory-method="getRuntimeService" />
<bean id="formService" factory-bean="processEngineFactory" factory-method="getFormService" />
<bean id="identityService" factory-bean="processEngineFactory" factory-method="getIdentityService" />
<bean id="taskService" factory-bean="processEngineFactory" factory-method="getTaskService" />
<bean id="historyService" factory-bean="processEngineFactory" factory-method="getHistoryService" />
<bean id="managementService" factory-bean="processEngineFactory" factory-method="getManagementService" />
<!-- json处理
<bean id="objectMapper" class="com.fasterxml.jackson.databind.ObjectMapper" />
-->
<!-- 设置默认的资源类型 -->
<bean id="contentTypeResolver" class="org.activiti.rest.common.application.DefaultContentTypeResolver" />
<!-- Activiti end -->
</beans>