Activiti Designer 流程设计器(IDEA 工具)

在这里插入图片描述
在这里插入图片描述
2. Activiti 支持的数据库在这里插入图片描述

  1. 创建表方式
 @Test
    public void testGenTable() {
        //1.创建ProcessEngineConfiguration对象
        ProcessEngineConfiguration configurationFromResource = ProcessEngineConfiguration
                .createProcessEngineConfigurationFromResource("activiti.cfg.xml");
        //2.创建ProcessEngine对象
        ProcessEngine processEngine = configurationFromResource.buildProcessEngine();
        //3.输出ProcessEngine对象
        System.out.println(processEngine);
    }
  1. activiti.cgf.xml
在 classpath 下创建 activiti.cgf.xml 文件: 
 
<?xml version="1.0" encoding="UTF-8"?> 
 
-instance" 
"http://www.springframework.org/schema/context" 
 
"http://www.springframework.org/schema/beans 
	beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema
       xmlns:context=
       xmlns:tx="http://www.springframework.org/schema/tx"        xsi:schemaLocation=	
http://www.springframework.org/schema/beans/spring-beans.xsd                   http://www.springframework.org/schema/contex http://www.springframework.org/schema/context/spring-context.xsd                   http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"> 
 
  
</beans> 

  1. 在activiti.xml中配置数据源和processEngineConfiguration
1) 数据源
<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&amp;characterEncoding=utf8&amp;serverTimezone=UTC"/>
        <property name="username" value="root"/>
        <property name="password" value="123"/>
        <property name="maxActive" value="3"/>
        <property name="maxIdle" value="1"/>
    </bean>
2) processEngineConfiguration
 <bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
        <property name="dataSource" ref="dataSource"></property>
        <property name="databaseSchemaUpdate" value="true"/>
  </bean>
3)数据源和processEngineConfiguration
<bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
        <property name="jdbcDriver" value="com.mysql.jdbc.Driver"/>
        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/activiti"/>
        <property name="jdbcUsername" value="root"/>
        <property name="jdbcPassword" value="root"/>
        <property name="databaseSchemaUpdate" value="true"/>
    </bean>

![在这里插入图片描述](https://img-blog.csdnimg.cn/20190802124715362.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2xpd3dud2Vu,size_16,color_FFFFFF,t_70
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值