org.activiti.engine.ActivitiException: couldn't check if tables are already present using metadata: dataSource or dataSourceClassName or jdbcUrl is required.
该回答引用chatgpt:
这个错误是 Activiti 引擎在初始化时出现的,原因是没有正确配置数据源信息。
在 Spring Boot 中,可以通过在 application.properties 或 application.yml 中配置数据源信息,以供 Activiti 引擎使用。
默认情况下,Spring Boot 会自动扫描 application.properties 或 application.yml 文件,但是如果你将配置文件放在了非默认的位置,就需要在启动类上添加 @PropertySource 注解,指定配置文件的路径,例如
@SpringBootApplication
@PropertySource("classpath:/my/application.properties")
public class MyApplication {
public static void main(String[] args) {
SpringApplication.run(MyApplication.class, args);
}
}
在上面的示例中,配置文件 application.properties 存放在 classpath:/my/ 目录下,通过 @PropertySource 注解指定了其路径。