一 spingBoot与Activiti7 整合(使用maven4)
pom中添加依赖
<!-- 这是阿里云地址 -->
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter</artifactId>
<version>7.1.0.M4</version>
</dependency>
<dependency>
<groupId>org.activiti.dependencies</groupId>
<artifactId>activiti-dependencies</artifactId>
<version>7.1.0.M4</version>
<type>pom</type>
</dependency>
注意:为什么不使用M5,因为M5有BUG,会在sql中自动生成一个流程去不掉,所以使用M4。
yml文件(项目初始化后,activiti不会创建历史表所以需要在yml中添加相关配置)
server:
port: 8080
servlet:
context-path: /
session:
timeout: 9000
spring:
datasource:
username: root
password: 666666
url: jdbc:mysql://127.0.0.1:3306/activiti?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=UTC&nullCatalogMeansCurrent=true
driver-class-name: com.mysql.cj.jdbc.Driver
#日志的相关配置
logging:
level:
root: info
# 这个是历史的级别 使用full 全部
spring.activiti.history-level: full
spring.activiti.db-history-used: true
# 自动部署验证设置:true-开启(默认)、false-关闭
spring.activiti.check-process-definitions: false