springboot2+mysql集成flowable6.6.0,启动失败

在 liquibase.changelog.StandardChangeLogHistoryService中有这样一段代码:
Object tmpDateExecuted = rs.get("DATEEXECUTED");
Date dateExecuted = null;
if (tmpDateExecuted instanceof Date) {
dateExecuted = (Date)tmpDateExecuted;
} else {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
dateExecuted = df.parse((String)tmpDateExecuted);
} catch (ParseException var24) {
}
}
DATEEXECUTED字段在数据库中为timestemp类型,当使用的数据库驱动包版本较新时(这里使用的是8.0.23)返回的类型为LocalDateTime,强转为string导致报错.

修改驱动包版本到8.0.19,服务正常启动

博客讲述了在尝试将SpringBoot2与Flowable6.6.0以及MySQL8.0.23集成时遇到的问题。由于数据库驱动版本较高,DATEEXECUTED字段返回LocalDateTime类型,导致代码尝试转换为String时出现异常。解决方案是回退MySQL驱动版本至8.0.19,从而避免类型转换错误,使得服务能够正常启动。
8965





