##新增配置
@Configurationpublic class ActivitiDatasourceConfig extends AbstractProcessEngineAutoConfiguration { @Bean @Primary @ConfigurationProperties(prefix = "spring.datasource.activiti") public DataSource activitiDataSource() { return DataSourceBuilder.create().build(); } @Bean public SpringProcessEngineConfiguration springProcessEngineConfiguration( PlatformTransactionManager transactionManager, SpringAsyncExecutor springAsyncExecutor) throws IOException { return baseSpringProcessEngineConfiguration( activitiDataSource(), transactionManager, springAsyncExecutor); }}
##primary注解 表示该数据源为主要的默认数据源,其他数据源需要自己额外指定事务管理器。
##docs