spring-context-activiti.xml 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="
  4. http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
  5. http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd"
  6. default-lazy-init="true">
  7. <description>Activiti Configuration</description>
  8. <!-- 加载配置属性文件 -->
  9. <context:property-placeholder ignore-unresolvable="true" location="classpath:/properties/jeeplus.properties" />
  10. <!-- 扫描REST -->
  11. <context:component-scan
  12. base-package="org.activiti.conf,org.activiti.rest.editor,org.activiti.rest.service">
  13. <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
  14. </context:component-scan>
  15. <!-- 单例json对象 -->
  16. <bean id="objectMapper" class="com.fasterxml.jackson.databind.ObjectMapper"/>
  17. <!-- Activiti begin -->
  18. <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
  19. <property name="dataSource" ref="dataSource" />
  20. <property name="transactionManager" ref="transactionManager" />
  21. <property name="deploymentResources" value="classpath*:/act/deployments/**/*.bar"/>
  22. <property name="databaseSchemaUpdate" value="false" />
  23. <property name="jobExecutorActivate" value="true" />
  24. <property name="history" value="full" />
  25. <property name="processDefinitionCacheLimit" value="10"/>
  26. <!-- UUID作为主键生成策略 -->
  27. <property name="idGenerator" ref="idGen" />
  28. <!-- 生成流程图的字体 -->
  29. <property name="activityFontName" value="${activiti.diagram.activityFontName}"/>
  30. <property name="labelFontName" value="${activiti.diagram.labelFontName}"/>
  31. <!-- 自定义用户权限 -->
  32. <property name="customSessionFactories">
  33. <list>
  34. <bean class="com.jeeplus.modules.act.service.ext.ActUserEntityServiceFactory"/>
  35. <bean class="com.jeeplus.modules.act.service.ext.ActGroupEntityServiceFactory"/>
  36. </list>
  37. </property>
  38. </bean>
  39. <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
  40. <property name="processEngineConfiguration" ref="processEngineConfiguration" />
  41. </bean>
  42. <bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
  43. <bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" />
  44. <bean id="formService" factory-bean="processEngine" factory-method="getFormService" />
  45. <bean id="identityService" factory-bean="processEngine" factory-method="getIdentityService" />
  46. <bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
  47. <bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
  48. <bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" />
  49. <!-- Activiti end -->
  50. <!-- 集成REST服务需要的bean -->
  51. <bean id="restResponseFactory" class="org.activiti.rest.service.api.RestResponseFactory" />
  52. <bean id="contentTypeResolver" class="org.activiti.rest.common.application.DefaultContentTypeResolver" />
  53. </beans>