初步完成 liteflow-solon-plugin 适配

This commit is contained in:
noear
2022-12-21 17:12:04 +08:00
parent 6b1d4d1e1a
commit 73982435b3
17 changed files with 20 additions and 51 deletions

View File

@@ -21,10 +21,10 @@ import org.noear.solon.core.AopContext;
@Configuration
public class LiteflowMainAutoConfiguration {
@Inject(value = "${liteflow.parse-on-start}",required = false)
@Inject(value = "${liteflow.parseOnStart}",required = false)
boolean parseOnStart;
@Inject(value = "${liteflow.monitor.enable-log}", required = false)
@Inject(value = "${liteflow.monitor.enableLog}", required = false)
boolean enableLog;
@Inject

View File

@@ -4,7 +4,6 @@ import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import com.yomahub.liteflow.flow.FlowBus;
import com.yomahub.liteflow.solon.LiteflowProperty;
import org.noear.solon.Solon;
import org.noear.solon.Utils;
import org.noear.solon.core.AopContext;
import org.noear.solon.core.Plugin;
@@ -22,12 +21,12 @@ public class XPluginImpl implements Plugin {
Properties defProps = Utils.loadProperties("META-INF/liteflow-default.properties");
if (defProps != null && defProps.size() > 0) {
defProps.forEach((k, v) -> {
Solon.cfg().putIfAbsent(k, v);
context.getProps().putIfAbsent(k, v);
});
}
//是否启用
boolean enable = Solon.cfg().getBool("liteflow.enable", false);
boolean enable = context.getProps().getBool("liteflow.enable", false);
if (!enable) {
return;