ApplicationContext-activiti.xml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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" xmlns:tx="http://www.springframework.org/schema/tx"
  4. xmlns:jee="http://www.springframework.org/schema/jee" xmlns:aop="http://www.springframework.org/schema/aop"
  5. xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
  6. http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
  7. http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
  8. http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd
  9. http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd">
  10. <!-- 使用系统数据源1 -->
  11. <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
  12. <property name="dataSource" ref="dataSource" />
  13. <property name="transactionManager" ref="transactionManager" />
  14. <property name="activityFontName" value="宋体"/>
  15. <property name="labelFontName" value="宋体"/>
  16. <property name="annotationFontName" value="宋体"/>
  17. <property name="databaseSchemaUpdate" value="true" /><!-- true:表不存在就自动创建,false:不创建 -->
  18. </bean>
  19. <!-- 独立链接数据库
  20. <bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
  21. <property name="jdbcDriver" value="com.mysql.jdbc.Driver"></property>
  22. <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/fhadmin?useUnicode=true&amp;characterEncoding=utf8"></property>
  23. <property name="jdbcUsername" value="root"></property>
  24. <property name="jdbcPassword" value="root"></property>
  25. <property name="databaseSchemaUpdate" value="true"></property>
  26. </bean>
  27. -->
  28. <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
  29. <property name="processEngineConfiguration" ref="processEngineConfiguration" />
  30. </bean>
  31. <bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
  32. <bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" />
  33. <bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
  34. <bean id="formService" factory-bean="processEngine" factory-method="getFormService" />
  35. <bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
  36. <bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" />
  37. <bean id="identityService" factory-bean="processEngine" factory-method="getIdentityService" />
  38. <bean id="objectMapper" class="com.fasterxml.jackson.databind.ObjectMapper"/>
  39. </beans>