本文主要是介绍【第024篇】Activiti5的配置文件和jar包,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
一、Activiti5.18所需的jar包
链接:https://pan.baidu.com/s/12L-0jt9b1iAaJH57ALQ38Q
提取码:k9o9
二、Activiti5配置文件
1、新建一个名为spring-activiti.xml的配置文件,将下面代码复制到该文件中。
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"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.xsd"><bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"><property name="driverClassName" value="com.mysql.jdbc.Driver" /><property name="url"value="jdbc:mysql://localhost:3306/activiti?useUnicode=true&characterEncoding=utf-8" /><property name="username" value="root" /><property name="password" value="root" /><property name="defaultAutoCommit" value="false" /></bean> <!-- <bean id="processEngineConfiguration"class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration"><property name="dataSource" ref="dataSource" /><property name="databaseType" value="mysql" /><property name="databaseSchemaUpdate" value="true" /><property name="jobExecutorActivate" value="false" /></bean> --><bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"><property name="dataSource" ref="dataSource" /></bean><!-- 单例json对象 --><bean id="objectMapper" class="com.fasterxml.jackson.databind.ObjectMapper" /><!-- 工作流引擎配置bean --><bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration"><property name="dataSource" ref="dataSource" /><property name="transactionManager" ref="transactionManager" /><!-- 是否自动创建表:true --><property name="databaseSchemaUpdate" value="true" /><!-- 是否激活Activiti的任务调度:false --><property name="jobExecutorActivate" value="false" /><!-- 生成流程图的字体 --><property name="activityFontName" value="宋体"/><property name="labelFontName" value="宋体"/></bean><!-- 流程引擎 --><bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean"><property name="processEngineConfiguration" ref="processEngineConfiguration" /></bean><!-- activiti的7大服务接口 --><bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" /><bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" /><bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" /><bean id="formService" factory-bean="processEngine" factory-method="getFormService" /><bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" /><bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" /><bean id="identityService" factory-bean="processEngine" factory-method="getIdentityService" />
</beans>
这篇关于【第024篇】Activiti5的配置文件和jar包的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!