- 使用eclipse或者IDEA创建springboot项目,命名为:spb-activiti7,选择spring-boot-parent版本为:2.6.2并引入web 和mysqljar引用
- 在pom文件中引入activiti7坐标,版本号为:7.0.0.Beta2,pom全文件如下:
4.0.0
org.springframework.boot
spring-boot-starter-parent
2.6.2
com.yf.cn
sbt-act7
0.0.1-SNAPSHOT
springboot-activiti7
Demo project for Spring Boot
1.8
org.springframework.boot
spring-boot-starter-web
org.springframework.boot
spring-boot-devtools
runtime
true
org.projectlombok
lombok
true
org.activiti
activiti-spring-boot-starter
7.0.0.Beta2
org.springframework.boot
spring-boot-starter-jdbc
mysql
mysql-connector-java
runtime
org.springframework.boot
spring-boot-starter-test
test
org.springframework.boot
spring-boot-maven-plugin
- 添加application.yml配置:数据库信息对应成自己的即可
spring:
datasource:
username: root
password: 123456
url: jdbc:mysql://localhost:3306/spbt-activiti7?nullCatalogMeansCurrent=true
driver-class-name: com.mysql.cj.jdbc.Driver
devtools:
restart:
enabled: true #设置开启热部署
activiti:
database-schema-update: true
history-level: full
db-history-used: true
debug: false
- 启动springboot,看控制台以及对应的数据库看看是否生成了对应的25张表
- 至此说明springboot和activiti7整合的初步环境已经搭建成功,接下来设计流程图,进行相应的流程测试
- 流程图设计如下: