enhancement #I5RV3G 规则插件的报错无法抛出来

This commit is contained in:
everywhere.z
2022-10-24 11:49:10 +08:00
parent 310454929b
commit 4e7d188135
5 changed files with 43 additions and 39 deletions

View File

@@ -11,6 +11,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;
import org.springframework.context.annotation.Import;
/**
@@ -27,14 +28,17 @@ import org.springframework.context.annotation.Import;
@Import(SpringAware.class)
public class LiteflowMainAutoConfiguration {
//实例化ComponentScanner
//多加一个SpringAware的意义是确保在执行这个的时候SpringAware这个bean已经被初始化
@Bean
public ComponentScanner componentScanner(LiteflowConfig liteflowConfig){
public ComponentScanner componentScanner(LiteflowConfig liteflowConfig, SpringAware springAware){
return new ComponentScanner(liteflowConfig);
}
//实例化FlowExecutor
//多加一个SpringAware的意义是确保在执行这个的时候SpringAware这个bean已经被初始化
@Bean
public FlowExecutor flowExecutor(LiteflowConfig liteflowConfig) {
public FlowExecutor flowExecutor(LiteflowConfig liteflowConfig, SpringAware springAware) {
FlowExecutor flowExecutor = new FlowExecutor();
flowExecutor.setLiteflowConfig(liteflowConfig);
return flowExecutor;
@@ -47,9 +51,11 @@ public class LiteflowMainAutoConfiguration {
return new LiteflowExecutorInit(flowExecutor);
}
@Bean
//实例化MonitorBus
//多加一个SpringAware的意义是确保在执行这个的时候SpringAware这个bean已经被初始化
@Bean("monitorBus")
@ConditionalOnProperty(prefix = "liteflow", name = "monitor.enable-log", havingValue = "true")
public MonitorBus monitorBus(LiteflowConfig liteflowConfig) {
public MonitorBus monitorBus(LiteflowConfig liteflowConfig, SpringAware springAware) {
return new MonitorBus(liteflowConfig);
}
}