具体报错信息:
***************************
APPLICATION FAILED TO START
***************************Description:
Parameter 0 of method springProcessEngineConfiguration in org.activiti.spring.boot.ProcessEngineAutoConfiguration required a bean of type 'javax.sql.DataSource' that could not be found.
The following candidates were found but could not be injected:
- Bean method 'dataSource' in 'JndiDataSourceAutoConfiguration' not loaded because @ConditionalOnProperty (spring.datasource.jndi-name) did not find property 'jndi-name'
- Bean method 'dataSource' in 'XADataSourceAutoConfiguration' not loaded because @ConditionalOnClass did not find required class 'javax.transaction.TransactionManager'Action:
Consider revisiting the entries above or defining a bean of type 'javax.sql.DataSource' in your configuration.
报这个错,一般是因为框架里需要数据源,但是工程里又没有配置数据源引起的。但是我的pom里已经引入了mysql的驱动包,application.properties文件里也配置了mysql的连接信息,确定无误。但是依然报这个错,百思不得其解。后来仔细对比了网上的一些例子,终于发现了问题所在,那就是pom里只引入mysql的驱动包还不够,还需要引入spring-boot-starter-jdbc包才行。引入此包后问题解决。