Activiti7⽣成表结构
⾸先创建⼀个Maven项⽬
整体的项⽬结构
l配置⽂件
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="/schema/beans"
xmlns:xsi="/2001/XMLSchema-instance"
xmlns:context="/schema/context"
xmlns:tx="/schema/tx"
xsi:schemaLocation="/schema/beans /schema/beans/spring-beans.xsd                        /schema/contex /schema/context/spring-context.xsd
/schema/tx /schema/tx/spring-tx.xsd">
<!--    dbcp 数据源-->
<bean id="dataSource" class="org.apachemons.dbcp.BasicDataSource">
<property name="driverClassName" value="sql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://192.168.0.23:3306/activiti" />
<property name="username" value="root" />
<property name="password" value="root" />
<property name="maxActive" value="3" />
<property name="maxIdle" value="1" />
</bean>
<!--    activiti 引擎配置-->
<bean id="processEngineConfiguration" class="ine.impl.cfg.StandaloneProcessEngineConfiguration">
<!--        数据源-->
<property name="dataSource" ref="dataSource"></property>
<!--        是否⽣⾠表结构-->
<property name="databaseSchemaUpdate" value="true"/>
</bean>
</beans>
log4j.properties配置⽂件
# Set root category priority to INFO and its only appender to CONSOLE.
#Category=INFO, CONSOLE            debug  info  warn error fatal
# Set the enterprise logger category to FATAL and its only appender to CONSOLE.
prise=FATAL, CONSOLE
# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} %-6r [%15.15t] %-5p %30.30c %x - %m\n
# LOGFILE is set to be a File appender using a PatternLayout.
log4j.appender.LOGFILE=org.apache.log4j.FileAppender
log4j.appender.LOGFILE.File=d:\axis.log
createprocessalog4j.appender.LOGFILE.Append=true
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%d{ISO8601} %-6r [%15.15t] %-5p %30.30c %x - %m\n 测试类
package st;
import ine.ProcessEngine;
import ine.ProcessEngineConfiguration;
import org.junit.Test;
/**
* 测试表
*/
public class ActivitiTest {
/**
* ⽣成表结构
*/
@Test
public  void testGenTable(){
/
/ 1: 通过资源⽂件创建 ProcessEngineConfiguration
ProcessEngineConfiguration processEngineConfiguration =
ProcessEngine processEngine = processEngineConfiguration.buildProcessEngine();
System.out.println(processEngine);
}
}
点击测试,如果数据库配置没有问题就可以⽣成表了
结果:
25张
作者:彼岸舞
时间:2020\08\27
内容关于:Activiti⼯作流
本⽂来源于⽹络,只做技术分享,⼀概不负任何责任

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。