From cb581566936e5d21933e0a8ff8c458e830e890ec Mon Sep 17 00:00:00 2001 From: yyx <775289630@qq.com> Date: Fri, 24 Dec 2021 11:34:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9B=B4=E6=96=B0=EF=BC=8C?= =?UTF-8?q?=E5=88=A0=E9=99=A4service=E7=B1=BB=E5=9E=8B=E7=9A=84=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E8=B7=AF=E7=94=B1=E5=BC=82=E5=B8=B8=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/apache/dubbo/admin/service/impl/RouteServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/service/impl/RouteServiceImpl.java b/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/service/impl/RouteServiceImpl.java index 4856a5fc5..e15375e36 100644 --- a/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/service/impl/RouteServiceImpl.java +++ b/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/service/impl/RouteServiceImpl.java @@ -77,6 +77,7 @@ public void updateConditionRoute(ConditionRouteDTO newConditionRoute) { //for 2.6 if (StringUtils.isNotEmpty(newConditionRoute.getService())) { for (Route old : convertRouteToOldRoute(oldConditionRoute)) { + old.setService(id); registry.unregister(old.toUrl().addParameter(Constants.COMPATIBLE_CONFIG, true)); } for (Route updated : convertRouteToOldRoute(newConditionRoute)) { @@ -101,6 +102,7 @@ public void deleteConditionRoute(String id) { RoutingRule originRule = YamlParser.loadObject(config, RoutingRule.class); ConditionRouteDTO conditionRouteDTO = RouteUtils.createConditionRouteFromRule(originRule); for (Route old : convertRouteToOldRoute(conditionRouteDTO)) { + old.setService(id); URL oldUrl = old.toUrl(); if(oldUrl.getParameter("rule").contains("host") && oldUrl.getParameter("rule").contains("false")) { registry.unregister(oldUrl);