Springboot集成Camunda使用Mysql介紹
一、匹配版本
基于Camunda 7.16.0 + Springboot 2.5.8
首先我們?nèi)ス倬W(wǎng)找到camunda7.16對(duì)應(yīng)的springboot版本。camunda官網(wǎng)
使用camunda流程引擎、web界面、Rest服務(wù)接口相應(yīng)依賴如下:
流程引擎:camunda-bpm-spring-boot-starterRest服務(wù)接口: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>
二、相關(guān)配置
首先新建一個(gè)數(shù)據(jù)庫
?再新建一個(gè)Springboot項(xiàng)目,引入相關(guān)的場景啟動(dòng)器
<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文件【注意修改數(shù)據(jù)庫名,數(shù)據(jù)庫用戶名和密碼等值】
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 #禁止自動(dòng)部署resources下面的bpmn文件 auto-deployment-enabled: false #禁止index跳轉(zhuǎn)到Camunda自帶的管理界面,默認(rèn)true # webapp: # index-redirect-enabled: false
直接啟動(dòng)項(xiàng)目后,就可以看到數(shù)據(jù)庫已經(jīng)生成了49張表
ACT_RE_*:RE代表存repository。帶有此前綴的表包含“靜態(tài)”信息,例如流程定義和流程資源(圖像、規(guī)則等)。
ACT_RU_*:RU代表runtime。這些是運(yùn)行時(shí)表,包含流程實(shí)例、用戶任務(wù)、變量、作業(yè)等的運(yùn)行時(shí)數(shù)據(jù)。引擎僅在流程實(shí)例執(zhí)行期間存儲(chǔ)運(yùn)行時(shí)數(shù)據(jù),并在流程實(shí)例結(jié)束時(shí)刪除記錄。這使運(yùn)行時(shí)表既小又快。
ACT_ID_*:ID代表identity。這些表包含身份信息,例如用戶、組等。
ACT_HI_*:HI代表history。這些是包含歷史數(shù)據(jù)的表,例如過去的流程實(shí)例、變量、任務(wù)等。
ACT_GE_*:GE代表 general一般數(shù)據(jù),用于各種用例
總結(jié)
到此這篇關(guān)于Springboot集成Camunda使用Mysql介紹的文章就介紹到這了,更多相關(guān)Springboot集成Camunda內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
spring?cloud?eureka注冊(cè)原理-注冊(cè)失敗填坑筆記
這篇文章主要介紹了spring?cloud?eureka注冊(cè)原理-注冊(cè)失敗填坑筆記,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2022-05-05MyBatis-Plus枚舉和自定義主鍵ID的實(shí)現(xiàn)步驟
這篇文章主要給大家介紹了關(guān)于MyBatis-Plus枚舉和自定義主鍵ID的相關(guān)資料,文中通過實(shí)例代碼以及圖文介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下2022-02-02Java數(shù)據(jù)庫連接池之c3p0簡介_動(dòng)力節(jié)點(diǎn)Java學(xué)院整理
這篇文章主要為大家詳細(xì)介紹了Java數(shù)據(jù)庫連接池之c3p0簡介的相關(guān)資料,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-08-08Java類中this關(guān)鍵字與static關(guān)鍵字的用法解析
這篇文章主要介紹了Java類中this關(guān)鍵字與static關(guān)鍵字的用法解析,文章圍繞主題展開詳細(xì)的內(nèi)容介紹,具有一定的參考價(jià)值,需要的小伙伴可以參考一下2022-09-09mybatis快速入門學(xué)習(xí)教程新手注意問題小結(jié)
MyBatis 是支持定制化 SQL、存儲(chǔ)過程以及高級(jí)映射的優(yōu)秀的持久層框架。接下來通過本文給大家介紹mybatis快速入門學(xué)習(xí)教程新手注意問題小結(jié),需要的朋友可以參考下2017-02-02