本文主要是介绍将activiti整合到spring里,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1、添加activiti有关的jar包,这不是下载的activiti全部jar包,如图为:
其他的jar包,如图:
2、在spring.xml里添加
<!-- 加载activiti引擎--> <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration"><property name="dataSource" ref="dataSource"/><property name="transactionManager" ref="transactionManager"/><property name="databaseSchemaUpdate" value="true"/><property name="jobExecutorActivate" value="false"/><!--<property name="databaseSchema" value="ACT"/>--> <!--<property name="history" value="full"/>--> <property name="processDefinitionCacheLimit" value="10"/><!-- 自动部署 --> <property name="deploymentResources"><list><value>classpath*:/activiti/*</value></list></property> </bean><bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean"><property name="processEngineConfiguration" ref="processEngineConfiguration"/></bean><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"/>
就可以了。
这篇关于将activiti整合到spring里的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!