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; }