1.加入maven依賴
<properties>
<!--工作流配置-->
<flowable.version>6.7.2</flowable.version>
<mybatis-plus.version>3.3.1</mybatis-plus.version>
</properties>
<dependencies>
<!-- web啟動(dòng)器-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!--mybatis-plus-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>${mybatis-plus.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-spring-boot-starter</artifactId>
<version>${flowable.version}</version>
<exclusions>
<exclusion>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
2.配置yml
server:
port: 8087
servlet:
context-path: /workflow
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/flowable?useUnicode=true&characterEncoding=utf8&nullCatalogMeansCurrent=true&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
username: root
password: root
--- #flowable配置
flowable:
async-executor-activate: false #關(guān)閉定時(shí)任務(wù)JOB
# 將databaseSchemaUpdate設(shè)置為true宜咒。當(dāng)Flowable發(fā)現(xiàn)庫(kù)與數(shù)據(jù)庫(kù)表結(jié)構(gòu)不一致時(shí)抢韭,會(huì)自動(dòng)將數(shù)據(jù)庫(kù)表結(jié)構(gòu)升級(jí)至新版本。
database-schema-update: true
# 日志級(jí)別是debug才能顯示SQL日志
logging:
level:
org.activiti.engine.impl.persistence.entity: debug
3啟動(dòng)SpringBoot項(xiàng)目
啟動(dòng)后會(huì)生成79張表
file
本文由博客一文多發(fā)平臺(tái) OpenWrite 發(fā)布!