Springboot集成Camunda使用Mysql介绍

作者:LoneWalker、 时间:2024-01-22 12:41:36 

一、匹配版本

基于Camunda 7.16.0 + Springboot 2.5.8

首先我们去官网找到camunda7.16对应的springboot版本。camunda官网

Springboot集成Camunda使用Mysql介绍

使用camunda流程引擎、web界面、Rest服务接口相应依赖如下:

流程引擎:camunda-bpm-spring-boot-starterRest服务接口:camunda-bpm-spring-boot-starter-restweb界面模块:camunda-bpm-spring-boot-starter-webapp


<dependency>
   <groupId>org.camunda.bpm.springboot</groupId>
   <artifactId>camunda-bpm-spring-boot-starter</artifactId>
   <version>7.16.0</version>
</dependency>



<dependency>
   <groupId>org.camunda.bpm.springboot</groupId>
   <artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
   <version>7.16.0</version>
</dependency>



<dependency>
   <groupId>org.camunda.bpm.springboot</groupId>
   <artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
   <version>7.16.0</version>
</dependency>

二、相关配置

首先新建一个数据库

Springboot集成Camunda使用Mysql介绍

 再新建一个Springboot项目,引入相关的场景启动器


       <dependency>
           <groupId>mysql</groupId>
           <artifactId>mysql-connector-java</artifactId>
           <scope>runtime</scope>
       </dependency>        
       <dependency>
           <groupId>org.camunda.bpm.springboot</groupId>
           <artifactId>camunda-bpm-spring-boot-starter</artifactId>
           <version>7.16.0</version>
       </dependency>
       <dependency>
           <groupId>org.mybatis.spring.boot</groupId>
           <artifactId>mybatis-spring-boot-starter</artifactId>
           <version>2.1.3</version>
       </dependency>

新建application.yml文件【注意修改数据库名,数据库用户名和密码等值


spring:
 datasource:
   url: jdbc:mysql://127.0.0.1:3306/snail?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false
   driver-class-name: com.mysql.cj.jdbc.Driver
   username: root
   password: 1234
 application:
   name: snail-workflow

camunda.bpm:
 # 配置账户密码来访问Camunda自带的管理界面
 admin-user:
   id: demo
   password: demo
   firstName: Demo
 filter:
   create: All tasks
 #禁止自动部署resources下面的bpmn文件
 auto-deployment-enabled: false
 #禁止index跳转到Camunda自带的管理界面,默认true
 #    webapp:
 #      index-redirect-enabled: false

直接启动项目后,就可以看到数据库已经生成了49张表

Springboot集成Camunda使用Mysql介绍

ACT_RE_*:RE代表存repository。带有此前缀的表包含“静态”信息,例如流程定义和流程资源(图像、规则等)。

ACT_RU_*:RU代表runtime。这些是运行时表,包含流程实例、用户任务、变量、作业等的运行时数据。引擎仅在流程实例执行期间存储运行时数据,并在流程实例结束时删除记录。这使运行时表既小又快。

ACT_ID_*:ID代表identity。这些表包含身份信息,例如用户、组等。

ACT_HI_*:HI代表history。这些是包含历史数据的表,例如过去的流程实例、变量、任务等。

ACT_GE_*:GE代表 general一般数据,用于各种用例

来源:https://blog.csdn.net/QingXu1234/article/details/122092677

标签:Springboot,camunda,mysql
0
投稿

猜你喜欢

  • 一篇文章带你学习Python3的高级特性(2)

    2021-03-29 13:56:40
  • 页面加载对访问的影响

    2009-10-30 18:54:00
  • 查询字符串中包含特殊字符的问题

    2009-01-09 13:13:00
  • 如何解决ASP脚本运行超时的错误

    2007-10-14 11:38:00
  • php环境配置 php5 MySQL5 apache2 phpmyadmin安装与配置图文教程

    2023-11-14 22:08:47
  • Python基础入门之魔法方法与异常处理

    2021-07-01 07:29:39
  • python操作excel之xlwt与xlrd

    2023-02-11 08:05:52
  • 傲游对开发人员的影响越来越大了

    2009-10-14 13:16:00
  • 如何创建CSS的对象,获取合适的粒度

    2010-07-09 13:10:00
  • Python进制转换用法详解

    2021-08-20 15:18:40
  • python使用py2neo查询Neo4j的节点、关系及路径

    2023-02-01 18:11:52
  • python实现的config文件读写功能示例

    2021-10-11 07:28:04
  • 在 SQL Server 数据库开发中的十大问题

    2009-07-02 16:39:00
  • python 基于pygame实现俄罗斯方块

    2021-07-22 15:47:23
  • Python网络爬虫之获取网络数据

    2022-10-09 12:35:54
  • Python爬取肯德基官网ajax的post请求实现过程

    2021-03-31 13:54:00
  • Python中functools模块函数解析

    2021-03-11 10:15:40
  • 历数Firefox2.0对XML处理的改进

    2007-11-27 12:41:00
  • python实现库存商品管理系统

    2023-06-01 06:37:29
  • 整理各种js按比例缩放图片方法

    2007-09-27 20:01:00
  • asp之家 网络编程 m.aspxhome.com