springboot集成flowable时踩坑日记:java.sql.SQLSyntaxErrorException: Table ‘flowable-test.act_id_user’ doesn’t exist……
报错信息:
problem during schema upgrade, statement alter table ACT_ID_USER add TENANT_ID_ varchar(255) default ‘’
java.sql.SQLSyntaxErrorException: Table ‘flowable-test.act_id_user’ doesn’t exist
![](https://img.laitimes.com/img/9ZDMuAjOiMmIsIjOiQnIsICM38FdsYkRGZkRG9lcvx2bjxiNx8VZ6l2cs0DOXRWd1cFZ1YkMMBjVtJWd0ckW65UbM5WOHJWa5kHT20ESjBjUIF2X0hXZ0xCMx81dvRWYoNHLrdEZwZ1Rh5WNXp1bwNjW1ZUba9VZwlHdssmch1mclRXY39CXldWYtlWPzNXZj9mcw1ycz9WL49zZuBnL5ITN2IjN1AjM5EjNwEjMwIzLc52YucWbp5GZzNmLn9Gbi1yZtl2Lc9CX6MHc0RHaiojIsJye.png)
原因:
MySql:
springboot中的application.yml文件,在配置数据库连接时(url),需要在尾巴加上&nullCatalogMeansCurrent=true,默认是false。(这样做的主要目的,是能保证flowable自动建表成功)
如:
mysql5.x版本
url: jdbc:mysql://localhost:3306/flowable-test?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=UTC&nullCatalogMeansCurrent=true
mysql8版本:
url: jdbc:mysql://localhost:3306/flowable-test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true