From fec26dfca0c796c2c9d4cd3c206affa0bc06c281 Mon Sep 17 00:00:00 2001
From: wuxw7 <wuxw7@asiainfo.com>
Date: 星期一, 02 七月 2018 22:52:48 +0800
Subject: [PATCH] 事件侦听改为注解方式,方便后期开发,取消配置文件方式
---
CenterService/src/main/java/com/java110/center/CenterServiceApplicationStart.java | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/CenterService/src/main/java/com/java110/center/CenterServiceApplicationStart.java b/CenterService/src/main/java/com/java110/center/CenterServiceApplicationStart.java
index f3dfb78..1e61db2 100644
--- a/CenterService/src/main/java/com/java110/center/CenterServiceApplicationStart.java
+++ b/CenterService/src/main/java/com/java110/center/CenterServiceApplicationStart.java
@@ -2,6 +2,8 @@
import com.java110.center.smo.ICenterServiceCacheSMO;
import com.java110.common.factory.ApplicationContextFactory;
+import com.java110.core.annotation.Java110ListenerDiscovery;
+import com.java110.event.center.DataFlowEventPublishing;
import com.java110.event.center.init.EventConfigInit;
import com.java110.service.init.ServiceStartInit;
import org.springframework.boot.SpringApplication;
@@ -29,6 +31,8 @@
@SpringBootApplication(scanBasePackages={"com.java110.service","com.java110.center","com.java110.core","com.java110.event.center","com.java110.cache"})
@EnableDiscoveryClient
//@EnableConfigurationProperties(EventProperties.class)
+@Java110ListenerDiscovery(listenerPublishClass = DataFlowEventPublishing.class,
+ basePackages = {"com.java110.center.listener"})
public class CenterServiceApplicationStart {
/**
@@ -61,7 +65,7 @@
ServiceStartInit.initSystemConfig(context);
//鍔犺浇浜嬩欢鏁版嵁
- EventConfigInit.initSystemConfig();
+ //EventConfigInit.initSystemConfig();
//鍒锋柊缂撳瓨
flushMainCache(args);
--
Gitblit v1.8.0