springboot整合activiti Posted on 2018-11-08 | Edited on 2019-01-11 添加依赖12345<dependency> <groupId>org.activiti</groupId> <artifactId>activiti-spring-boot-starter-basic</artifactId> <version>5.22.0</version> </dependency> 配置123456789101112131415161718192021222324252627282930313233343536373839404142434445@Configurationpublic class ActivitiConfig { @Bean("activityConfig") public SpringProcessEngineConfiguration getSpringProcessEngineConfiguration( @Qualifier("reconciliationdb") DataSource reconciliationdb, @Qualifier("reconciliationdbTransactionManager")DataSourceTransactionManager transactionManager){ SpringProcessEngineConfiguration configuration = new SpringProcessEngineConfiguration(); configuration.setDataSource(reconciliationdb); configuration.setTransactionManager(transactionManager); configuration.setActivityFontName("宋体"); configuration.setLabelFontName("宋体");// configuration.setDatabaseSchemaUpdate(ProcessEngineConfigurationImpl.DB_SCHEMA_UPDATE_CREATE) return configuration; } @Bean("activityProcessEngine") public ProcessEngine getProcessEngineFactoryBean(@Qualifier("activityConfig") SpringProcessEngineConfiguration configuration) throws Exception { ProcessEngineFactoryBean factoryBean = new ProcessEngineFactoryBean(); factoryBean.setProcessEngineConfiguration(configuration); return factoryBean.getObject(); } @Bean public RuntimeService getRuntimeService(@Qualifier("activityProcessEngine") ProcessEngine engine) { return engine.getRuntimeService(); } @Bean public RepositoryService getRepositoryService(@Qualifier("activityProcessEngine") ProcessEngine engine) { return engine.getRepositoryService(); } @Bean public TaskService getTaskService(@Qualifier("activityProcessEngine") ProcessEngine engine) { return engine.getTaskService(); } @Bean public HistoryService getHistoryService (@Qualifier("activityProcessEngine") ProcessEngine engine) { return engine.getHistoryService(); }} 官方文档