File tree Expand file tree Collapse file tree
flow/src/main/java/org/bekit/flow Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 * (非spring-boot项目需手动引入本配置类完成流程引擎配置)
2525 */
2626@ Configuration
27- @ Import (EventBusConfiguration .class )
27+ @ Import ({EventBusConfiguration .class ,
28+ FlowsHolder .class ,
29+ ProcessorsHolder .class ,
30+ FlowTxsHolder .class })
2831public class FlowEngineConfiguration {
2932
3033 // 流程引擎
@@ -33,24 +36,6 @@ public FlowEngine flowEngine() {
3336 return new DefaultFlowEngine ();
3437 }
3538
36- // 流程持有器
37- @ Bean
38- public FlowsHolder flowsHolder () {
39- return new FlowsHolder ();
40- }
41-
42- // 处理器持有器
43- @ Bean
44- public ProcessorsHolder processorsHolder () {
45- return new ProcessorsHolder ();
46- }
47-
48- // 流程事务持有器
49- @ Bean
50- public FlowTxsHolder flowTxsHolder () {
51- return new FlowTxsHolder ();
52- }
53-
5439 // 默认的流程监听器
5540 @ Bean
5641 public DefaultFlowListener defaultFlowListener () {
Original file line number Diff line number Diff line change 1414import org .bekit .flow .transaction .FlowTxsHolder ;
1515import org .springframework .beans .factory .annotation .Autowired ;
1616import org .springframework .context .ApplicationContext ;
17+ import org .springframework .stereotype .Component ;
1718
1819import javax .annotation .PostConstruct ;
1920import java .util .HashMap ;
2021import java .util .Map ;
2122import java .util .Set ;
2223
2324/**
24- * 流程持有器(会被注册到spring容器中)
25+ * 流程持有器
2526 */
27+ @ Component
2628public class FlowsHolder {
2729 @ Autowired
2830 private ApplicationContext applicationContext ;
Original file line number Diff line number Diff line change 1111import org .bekit .flow .annotation .processor .Processor ;
1212import org .springframework .beans .factory .annotation .Autowired ;
1313import org .springframework .context .ApplicationContext ;
14+ import org .springframework .stereotype .Component ;
1415
1516import javax .annotation .PostConstruct ;
1617import java .util .HashMap ;
1718import java .util .Map ;
1819import java .util .Set ;
1920
2021/**
21- * 处理器持有器(会被注册到spring容器中)
22+ * 处理器持有器
2223 */
24+ @ Component
2325public class ProcessorsHolder {
2426 @ Autowired
2527 private ApplicationContext applicationContext ;
Original file line number Diff line number Diff line change 1111import org .bekit .flow .annotation .transaction .FlowTx ;
1212import org .springframework .beans .factory .annotation .Autowired ;
1313import org .springframework .context .ApplicationContext ;
14+ import org .springframework .stereotype .Component ;
1415import org .springframework .transaction .PlatformTransactionManager ;
1516
1617import javax .annotation .PostConstruct ;
1920import java .util .Set ;
2021
2122/**
22- * 流程事务持有器(会被注册到spring容器中)
23+ * 流程事务持有器
2324 */
25+ @ Component
2426public class FlowTxsHolder {
2527 @ Autowired
2628 private ApplicationContext applicationContext ;
You can’t perform that action at this time.
0 commit comments