[com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: com.mysql.cj.jdbc.Driver
不一样的版本问题解决方式也不一样,一些配置文件驱动类写错或者加空格的低级错误就不要看了。
我下载的flowable版本:
https://github.com/flowable/flowable-engine/releases/tag/flowable-6.7.2
使用spring.datasource.driver-class-name=com.mysql.jdbc.Driver
报错:
[com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: com.mysql.cj.jdbc.Driver
解决:
将flowable-ui\WEB-INF\lib 下面 mysql-connector-java-5.1.45-sources.jar
替换成mysql-connector-java-8.0.27.jar
修改驱动:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
重启正常