springboot整合flowable

参考官方文档地址为:
https://www.flowable.com/open-source/docs/bpmn/ch05a-Spring-Boot

注意:

  1. springboot版本为2.6.11
  2. flowable版本为6.7.2

新建springboot项目,添加一个web依赖:


org.springframework.boot
spring-boot-starter-web

然后按照官方文档添加flowable依赖:


org.flowable
flowable-spring-boot-starter
6.7.2

添加mysql依赖:


mysql
mysql-connector-java

application.properties里添加配置项:

server.port=8080
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost/flowable?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=utf8&failOverReadOnly=false&useSSL=false&allowMultiQueries=true&serverTimezone=GMT%2b8&allowMultiQueries=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
spring.datasource.username=root
spring.datasource.password=123456

注意这里有个坑,数据库连接需要加上&nullCatalogMeansCurrent=true才会在数据库中自动创建表。

之后启动项目,项目启动成功,整合完毕。

posted @ 2023-01-30 16:27  努力干饭的兔兔  阅读(558)  评论(0)    收藏  举报