SpringBoot2整合activiti6环境搭建过程解析
作者:涛先森の日常 发布时间:2023-11-09 02:27:03
标签:spring,boot,2,整合,activiti,6,环境,搭建
这篇文章主要介绍了SpringBoot2整合activiti6环境搭建过程解析,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
依赖
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter-basic</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<!-- mysql驱动 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
</dependencies>
这里使用的springboot2.0.6的版本,activiti为6.0.0的版本
添加processes目录
SpringBoot集成activiti默认会从classpath下的processes目录下读取流程定义文件,所以需要在src/main/resources目录下添加processes目录,并在目录中创建流程文件
application.yml
spring:
activiti:
check-process-definitions: true #自动检查、部署流程定义文件
database-schema-update: true #自动更新数据库结构
#流程定义文件存放目录
process-definition-location-prefix: classpath:/processes/
#process-definition-location-suffixes: #流程文件格式
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/taosir_process?useUnicode=true&useSSL=false&characterEncoding=utf8
username : root
password : root
initsize : 10
maxActive : 20
minIdle : 10
maxWait : 120000
poolPreparedStatements : false
maxOpenPreparedStatements : -1
validationQuery : select 1
testOnborrow : true
testOnReturn : true
testWhileIdle : true
timeBetweenEvictionRunsMillis : 120000
server:
port: 8764
bpmn文件
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:tns="Examples" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.w3.org/1999/XPath" id="m1539757531057" name="" targetNamespace="Examples" typeLanguage="http://www.w3.org/2001/XMLSchema">
<process id="oneTaskProcess" isClosed="false" name="The One Task Process" processType="None">
<startEvent id="theStart"/>
<sequenceFlow id="flow1" sourceRef="theStart" targetRef="theTask"/>
<userTask activiti:assignee="${user}" activiti:exclusive="true" id="theTask" name="my task"/>
<sequenceFlow id="flow2" sourceRef="theTask" targetRef="theEnd"/>
<endEvent id="theEnd"/>
</process>
</definitions>
启动类,注意@SpringBootApplication注解需要设置exclude属性
package cn.zytao.taosir.process;
import org.activiti.spring.boot.SecurityAutoConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication(exclude = SecurityAutoConfiguration.class)
public class ProcessApplication {
public static void main(String[] args) {
SpringApplication.run(ProcessApplication.class, args);
}
}
来源:https://www.cnblogs.com/it-taosir/p/10319945.html


猜你喜欢
- 这篇文章主要介绍了Java多态中动态绑定原理解析,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以
- mybatis3中增加了使用注解来配置Mapper的新特性,本篇文章主要介绍其中几个@Provider的使用方式,他们是:@SelectPr
- 在很多场景下,maven不能直接访问到外网时,使用代理是其中常见的一种方式。这篇文章整理一下常见的maven中设置代理的方法。代理服务器代理
- 我就废话不多说了,大家还是直接看代码吧~public int read(byte[] b) throws IOException
- 目录第一点——加载网页结构第二点——解析网页结构,转变为符合需求的数据实体第三点——保存数据实体,转变为符合需求的数据实体第四点——main
- 一、Flutter介绍Flutter是谷歌的移动UI框架,可以快速在iOS和Android上构建高质量的原生用户界面。Flutter可以与现
- 本文实例为大家分享了Java实现通讯录管理系统的具体代码,供大家参考,具体内容如下一、前言我们学了这么久的知识了,光学知识不会用是一件很悲伤
- 本文实例为大家分享了Android实现手机自动获取短信验证码功能,供大家参考,具体内容如下1、短信监听广播2、读取短信内容3、截取短信内容【
- 先看一段代码: private DataSet GetDataSet(string strsql){ string s
- 本文实例讲述了java实现简单的英文文本单词翻译器功能。分享给大家供大家参考,具体如下:直接上代码:package fanyi;import
- 前言列表在我们的日常开发中使用的频率是非常高的,像下图的歌曲播放列表,或者课程展示,那么这些场景都需要我们用到点击事件,点击歌曲播放歌曲,点
- C#事件标准命名规则一些开源代码的事件命名很混乱,以此文章用作本人以后工作的参考。事件的名称事件始终是指某个操作,这个操作可能正在发生,也可
- 以前使用HttpServletResponse可以通过输出流的方式来向前台输出图片。现在大部分都是使用springboot,在使用sprin
- 最近在做数据挖掘的课程设计,需要将数据分析的结果很直观的展现给用户,这就要用到数据统计图,要实现这个功能就需要几个第三方包了:1. 
- 使用@RequestParam注解获取参数创建Hello控制器类package com.controller;import org.spri
- 第一种就是 最常见的 用Try..Catch..再try中强转你要确认的string 类型成功就是int catch 就不是&n
- 一、项目简述本系统功能包括:数据统计、收件录入、发件录入、到件录入、派件录入、问题件录入、退件录入、留仓录入、装车录入、发车录入、到车录入、
- 生成随机数在现实中我们经常用到随机数,可怎么实现呢,且听小乔慢慢道来。在C语言中,我们一般使用 <stdlib.h> 头文件中的
- 一、获取某年某月的天数1.在实现日期类的过程中,日期加减天数的应用场景一定会频繁使用到这个函数接口,因为加减天数会使得月份发生变化,可能增月
- 消息的可靠投递在使用 RabbitMQ 的时候,作为消息发送方希望杜绝任何消息丢失或者投递失败场景。RabbitMQ 为我们提供了两种方式用