mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-06-13 11:14:38 +08:00
enhancement #I5RV3G 规则插件的报错无法抛出来
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user