File tree Expand file tree Collapse file tree
service/src/main/java/org/bekit/service 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 , ServicesHolder . class } )
2828public class ServiceEngineConfiguration {
2929
3030 // 服务引擎
3131 @ Bean
3232 public ServiceEngine serviceEngine (EventBusesHolder eventBusesHolder ) {
3333 return new DefaultServiceEngine (new DefaultEventPublisher (eventBusesHolder .getEventBus (ServiceListenerType .class )));
3434 }
35-
36- // 服务持有器
37- @ Bean
38- public ServicesHolder servicesHolder () {
39- return new ServicesHolder ();
40- }
4135}
Original file line number Diff line number Diff line change 1111import org .bekit .service .annotation .service .Service ;
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 ServicesHolder {
2527 @ Autowired
2628 private ApplicationContext applicationContext ;
You can’t perform that action at this time.
0 commit comments