Skip to content

Commit

Permalink
修复注册中心为zookeeper,管理控制台删除路由失败的问题
Browse files Browse the repository at this point in the history
这个问题是因为,在启用路由规则时,去掉了enabled参数。在删除路由规则时Route.toUrl方法会始终加上enabled参数,这样导致删除时zookeeper
中path不存在,删除失败。
  • Loading branch information
bohrqiu committed Sep 13, 2013
1 parent 8bdeb54 commit 9109e91
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ public void enableRoute(Long id) {
return;
}

URL newRoute = oldRoute.removeParameter("enabled");
registryService.unregister(oldRoute);
registryService.unregister(oldRoute);
URL newRoute= oldRoute.addParameter("enabled", true);
registryService.register(newRoute);

}
Expand Down

0 comments on commit 9109e91

Please sign in to comment.