flowable与spring boot集成

  1. pom.xml文件添加依赖
		<properties>
        	<flowable.version>6.4.2</flowable.version>
  	  	</properties>
        <dependency>
            <groupId>org.flowable</groupId>
            <artifactId>flowable-spring-boot-starter</artifactId>
            <version>${flowable.version}</version>
        </dependency>
        <dependency>
            <groupId>org.flowable</groupId>
            <artifactId>flowable-json-converter</artifactId>
            <version>${flowable.version}</version>
        </dependency>
  1. application.properties配置好数据库的连接池
mysql datasource url 后加 &nullCatalogMeansCurrent=true
	#比如Cause: java.sql.SQLSyntaxErrorException: Table ‘mall.act_ge_property’ doesn’t exist 这些查找不到表结构。
这个时候需要在mysql datasource url 链接后面添加nullCatalogMeansCurrent=true属性。这是因为我们用的是mysql8.0驱动,它默认nullCatalogMeansCurrent属性是false。改成true就可以自动生成表结构了。

 	# 自动生成flowable相关表 第一次生成后建议关闭提高运行速度
flowable.database-schema-update=true
	 # 保存历史数据级别设置为full最高级别,便于历史数据的追溯
flowable.history-level=full
  1. 启动spring boot后自动生成70张数据库表

猜你喜欢

转载自blog.csdn.net/weixin_43923112/article/details/114441779