From c14ee9ca0423f9ab208245190c08224db10c62cd Mon Sep 17 00:00:00 2001 From: zhanglong Date: Fri, 17 Jan 2020 01:58:13 +0800 Subject: [PATCH] Removed useless commits --- console/pom.xml | 5 ++- .../nacos/naming/core/ServiceManager.java | 3 -- .../nacos/naming/core/event/ServiceEvent.java | 31 ------------------- 3 files changed, 4 insertions(+), 35 deletions(-) delete mode 100644 naming/src/main/java/com/alibaba/nacos/naming/core/event/ServiceEvent.java diff --git a/console/pom.xml b/console/pom.xml index 5a77f934e..12c0cc6fb 100644 --- a/console/pom.xml +++ b/console/pom.xml @@ -39,7 +39,10 @@ tomcat-embed-jasper 7.0.59 - + + ${project.groupId} + nacos-naming + ${project.groupId} nacos-istio diff --git a/naming/src/main/java/com/alibaba/nacos/naming/core/ServiceManager.java b/naming/src/main/java/com/alibaba/nacos/naming/core/ServiceManager.java index e7e4adfdd..713cd1146 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/core/ServiceManager.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/core/ServiceManager.java @@ -21,7 +21,6 @@ import com.alibaba.fastjson.JSONObject; import com.alibaba.nacos.api.common.Constants; import com.alibaba.nacos.api.exception.NacosException; import com.alibaba.nacos.api.naming.utils.NamingUtils; -import com.alibaba.nacos.naming.boot.SpringContext; import com.alibaba.nacos.naming.cluster.ServerListManager; import com.alibaba.nacos.naming.cluster.servers.Server; import com.alibaba.nacos.naming.consistency.ConsistencyService; @@ -30,7 +29,6 @@ import com.alibaba.nacos.naming.consistency.KeyBuilder; import com.alibaba.nacos.naming.consistency.RecordListener; import com.alibaba.nacos.naming.consistency.persistent.raft.RaftPeer; import com.alibaba.nacos.naming.consistency.persistent.raft.RaftPeerSet; -import com.alibaba.nacos.naming.core.event.ServiceEvent; import com.alibaba.nacos.naming.misc.*; import com.alibaba.nacos.naming.push.PushService; import com.google.common.collect.Maps; @@ -158,7 +156,6 @@ public class ServiceManager implements RecordListener { } else { putServiceAndInit(service); } - SpringContext.getAppContext().publishEvent(new ServiceEvent(service)); } catch (Throwable e) { Loggers.SRV_LOG.error("[NACOS-SERVICE] error while processing service update", e); } diff --git a/naming/src/main/java/com/alibaba/nacos/naming/core/event/ServiceEvent.java b/naming/src/main/java/com/alibaba/nacos/naming/core/event/ServiceEvent.java deleted file mode 100644 index 658789782..000000000 --- a/naming/src/main/java/com/alibaba/nacos/naming/core/event/ServiceEvent.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 1999-2018 Alibaba Group Holding Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.alibaba.nacos.naming.core.event; - -import com.alibaba.nacos.naming.core.Service; -import org.springframework.context.ApplicationEvent; -/** - * @author paderlol - * - */ -public class ServiceEvent extends ApplicationEvent { - - /** - * Create a new ApplicationEvent. - * - * @param source the object on which the event initially occurred (never {@code null}) - */ - public ServiceEvent(Service source) { - super(source); - } -}