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