feat #I6BDLN 绝对路径的目录位置及其所有子目录下规则配置文件的侦听

This commit is contained in:
gaibu 2023-01-29 09:17:37 +08:00
parent dea0d35303
commit c6953b0f18
6 changed files with 26 additions and 6 deletions

View File

@ -181,7 +181,7 @@ public class FlowExecutor {
}
// 文件监听
if (liteflowConfig.getMonitorFileEnable()){
if (liteflowConfig.getEnableMonitorFile()){
MonitorFile.getInstance().create();
}
}

View File

@ -95,14 +95,14 @@ public class LiteflowConfig {
private String substituteCmpClass;
// 规则文件/脚本文件变更监听
private Boolean monitorFileEnable = Boolean.TRUE;
private Boolean enableMonitorFile = Boolean.FALSE;
public Boolean getMonitorFileEnable() {
return monitorFileEnable;
public Boolean getEnableMonitorFile() {
return enableMonitorFile;
}
public void setMonitorFileEnable(Boolean monitorFileEnable) {
this.monitorFileEnable = monitorFileEnable;
public void setEnableMonitorFile(Boolean enableMonitorFile) {
this.enableMonitorFile = enableMonitorFile;
}
public Boolean getEnable() {

View File

@ -70,6 +70,17 @@ public class LiteflowProperty {
//替补组件的class路径
private String substituteCmpClass;
// 规则文件/脚本文件变更监听
private Boolean enableMonitorFile;
public Boolean getEnableMonitorFile() {
return enableMonitorFile;
}
public void setEnableMonitorFile(Boolean enableMonitorFile) {
this.enableMonitorFile = enableMonitorFile;
}
public boolean isEnable() {
return enable;
}

View File

@ -47,6 +47,7 @@ public class LiteflowPropertyAutoConfiguration {
liteflowConfig.setMainExecutorClass(property.getMainExecutorClass());
liteflowConfig.setPrintExecutionLog(property.isPrintExecutionLog());
liteflowConfig.setSubstituteCmpClass(property.getSubstituteCmpClass());
liteflowConfig.setEnableMonitorFile(property.getEnableMonitorFile());
return liteflowConfig;
}
}

View File

@ -158,6 +158,13 @@
"description": "Set period time to print monitor log.",
"sourceType": "com.yomahub.liteflow.springboot.LiteflowMonitorProperty",
"defaultValue": 300000
},
{
"name": "liteflow.enable-monitor-file",
"type": "java.lang.Boolean",
"description": "Set file change monitoring.",
"sourceType": "com.yomahub.liteflow.springboot.LiteflowMonitorProperty",
"defaultValue": false
}
]
}

View File

@ -18,3 +18,4 @@ liteflow.monitor.enable-log=false
liteflow.monitor.queue-limit=200
liteflow.monitor.delay=300000
liteflow.monitor.period=300000
liteflow.enable-monitor-file=false