properties說明
activiti對springboot支持的配置項都有那些,首先我們從源碼分析,找到jar包如下
打開可以看到源碼如下:很可惜,這個源碼沒有註釋,下面一個個解釋
//是否校驗流程文件的正確性,默認開啟驗證,如果流程文件有問題,則項目會啟動失敗
private boolean checkProcessDefinitions = true;
//流程啟動是否支持異步調用,默認支持異步調用
private boolean asyncExecutorActivate = true;
//流程部署的名稱
private String deploymentName = "SpringAutoDeployment";
//郵件發送服務器設置(mail開頭的)
private String mailServerHost = "localhost";
private int mailServerPort = 1025;
private String mailServerUserName;
private String mailServerPassword;
private String mailServerDefaultFrom;
private boolean mailServerUseSsl;
private boolean mailServerUseTls;
//數據建表規則,默認配置true
- flase: activiti在啟動時,會對比數據庫表中保存的版本,如果沒有表或者版本不匹配,將拋出異常。
- true: activiti會對數據庫中所有表進行更新操作。如果表不存在,則自動創建。
- create_drop: 在activiti啟動時創建表,在關閉時刪除表必須手動關閉引擎,才能刪除。
- drop-create: 在activiti啟動時刪除原來的舊錶,然後在創建新表,不需要手動關閉引擎
private String databaseSchemaUpdate = "true";
//指定數據源
private String databaseSchema;
//檢查歷史表
private boolean dbHistoryUsed = false;
//記錄歷史數據等級,none, acitivity, audit, all
private HistoryLevel historyLevel = HistoryLevel.NONE;
//流程文件的目錄
private String processDefinitionLocationPrefix = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX + "**/processes/";
//流程文件的後綴
private List processDefinitionLocationSuffixes = Arrays.asList("**.bpmn20.xml", "**.bpmn");
//自定義mybatis-mapper
private List customMybatisMappers;
private List customMybatisXMLMappers;
//用StrongUuidGenerator生成id
private boolean useStrongUuids = true;
private boolean copyVariablesToLocalForTasks = true;
private String deploymentMode = "default";
private boolean serializePOJOsInVariablesToJson = true;
沒有特殊需求,一般如下配置即可
spring.datasource.url=jdbc:mysql://*****:3311/act?characterEncoding=utf8&useSSL=true spring.datasource.username=act spring.datasource.password=act spring.datasource.driver-class-name=com.mysql.jdbc.Driver
大家互相學習,請大家關注!謝謝!