mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-18 13:58:07 +08:00
初步完成 liteflow-solon-plugin 适配
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user