File tree Expand file tree Collapse file tree
event/src/main/java/org/bekit/event/boot
flow/src/main/java/org/bekit/flow Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515import org .bekit .event .publisher .DefaultEventPublisher ;
1616import org .springframework .context .annotation .Bean ;
1717import org .springframework .context .annotation .Configuration ;
18+ import org .springframework .context .annotation .DependsOn ;
1819import org .springframework .context .annotation .Import ;
1920
2021/**
@@ -27,6 +28,7 @@ public class EventBusConfiguration {
2728
2829 // 业务事件发布器
2930 @ Bean
31+ @ DependsOn ("org.bekit.event.bus.EventBusesHolder" ) // 保证出现循环引用时不会出错
3032 public EventPublisher eventPublisher (EventBusesHolder eventBusesHolder ) {
3133 return new DefaultEventPublisher (eventBusesHolder .getEventBus (BizListenerType .class ));
3234 }
Original file line number Diff line number Diff line change 1717import org .bekit .flow .transaction .FlowTxsHolder ;
1818import org .springframework .context .annotation .Bean ;
1919import org .springframework .context .annotation .Configuration ;
20+ import org .springframework .context .annotation .DependsOn ;
2021import org .springframework .context .annotation .Import ;
2122
2223/**
@@ -33,6 +34,7 @@ public class FlowEngineConfiguration {
3334
3435 // 流程引擎
3536 @ Bean
37+ @ DependsOn ({"org.bekit.flow.flow.FlowsHolder" , "org.bekit.flow.transaction.FlowTxsHolder" }) // 保证出现循环引用时不会出错
3638 public FlowEngine flowEngine (FlowsHolder flowsHolder , FlowTxsHolder flowTxsHolder ) {
3739 return new DefaultFlowEngine (flowsHolder , flowTxsHolder );
3840 }
Original file line number Diff line number Diff line change 1515import org .bekit .flow .annotation .listener .FlowListener ;
1616import org .bekit .flow .event .FlowExceptionEvent ;
1717import org .bekit .flow .event .NodeDecidedEvent ;
18+ import org .springframework .context .annotation .DependsOn ;
1819
1920/**
2021 * 默认的流程监听器
2122 * (流程引擎初始化时会初始化本监听器,其作用是监听所有流程发生的事件,然后将事件转发给对应流程的特定流程监听器(@TheFlowListener))
2223 */
2324@ FlowListener
25+ @ DependsOn ("org.bekit.event.bus.EventBusesHolder" ) // 保证出现循环引用时不会出错
2426public class DefaultFlowListener {
2527 // 特定流程事件发布器
2628 private EventPublisher eventPublisher ;
You can’t perform that action at this time.
0 commit comments