activiti-配置数据源为PostgreSql
postgresql是数据库类型为postgres
在yml中配置activiti参数
spring: activiti: database-type: postgres # 数据库类型 database-schema-update: true # 建表规则 为true会自动创建表 db-history-used: false # 检测历史表是否存在
也可以在ActivitiConfig中直接配置
/** * 流程配置,与spring整合采用SpringProcessEngineConfiguration这个实现 * @param dataSource * @param transactionManager * @return */ @Bean public ProcessEngineConfiguration processEngineConfiguration(DataSource dataSource, PlatformTransactionManager transactionManager){ SpringProcessEngineConfiguration processEngineConfiguration = new SpringProcessEngineConfiguration(); processEngineConfiguration.setDataSource(dataSource); processEngineConfiguration.setDatabaseSchemaUpdate("true"); processEngineConfiguration.setDatabaseType("postgres"); processEngineConfiguration.setTransactionManager(transactionManager); //流程图字体 processEngineConfiguration.setActivityFontName("宋体"); processEngineConfiguration.setAnnotationFontName("宋体"); processEngineConfiguration.setLabelFontName("宋体"); return processEngineConfiguration; }