Commit 9d0feadb by Nepxion

修改变量名

parent 6beb247a
...@@ -76,10 +76,10 @@ public class RouterController { ...@@ -76,10 +76,10 @@ public class RouterController {
return getRouterEntityList(routeServiceId, routeHost, routePort); return getRouterEntityList(routeServiceId, routeHost, routePort);
} }
// 获取全路径的路由信息(serviceIds按调用服务名的前后次序排列,起始节点的服务名不能加上去。如果多个用“;”分隔,不允许出现空格) // 获取全路径的路由信息(routeServiceIds按调用服务名的前后次序排列,起始节点的服务名不能加上去。如果多个用“;”分隔,不允许出现空格)
@RequestMapping(path = "/routeAll", method = RequestMethod.POST) @RequestMapping(path = "/routeAll", method = RequestMethod.POST)
public RouterEntity routeAll(@RequestBody String serviceIds) { public RouterEntity routeAll(@RequestBody String routeServiceIds) {
return executeRouteAll(serviceIds); return executeRouteAll(routeServiceIds);
} }
public List<ServiceInstance> getInstanceList(String serviceId) { public List<ServiceInstance> getInstanceList(String serviceId) {
...@@ -107,7 +107,7 @@ public class RouterController { ...@@ -107,7 +107,7 @@ public class RouterController {
try { try {
instanceList = getInstanceList(routeServiceId); instanceList = getInstanceList(routeServiceId);
} catch (Exception e) { } catch (Exception e) {
throw new PluginException("Get instance list for serviceId=" + routeServiceId + " failed", e); throw new PluginException("Get instance list for route serviceId=" + routeServiceId + " failed", e);
} }
if (CollectionUtils.isEmpty(instanceList)) { if (CollectionUtils.isEmpty(instanceList)) {
...@@ -141,7 +141,7 @@ public class RouterController { ...@@ -141,7 +141,7 @@ public class RouterController {
try { try {
instanceList = routerRestTemplate.getForEntity(url, List.class).getBody(); instanceList = routerRestTemplate.getForEntity(url, List.class).getBody();
} catch (RestClientException e) { } catch (RestClientException e) {
throw new PluginException("Get instance list for serviceId=" + routeServiceId + " with url=" + url + " failed", e); throw new PluginException("Get instance list for route serviceId=" + routeServiceId + " with url=" + url + " failed", e);
} }
if (CollectionUtils.isEmpty(instanceList)) { if (CollectionUtils.isEmpty(instanceList)) {
...@@ -167,16 +167,16 @@ public class RouterController { ...@@ -167,16 +167,16 @@ public class RouterController {
return routerEntityList; return routerEntityList;
} }
public RouterEntity executeRouteAll(String serviceIds) { public RouterEntity executeRouteAll(String routeServiceIds) {
if (StringUtils.isEmpty(serviceIds)) { if (StringUtils.isEmpty(routeServiceIds)) {
throw new PluginException("Service ids is empty"); throw new PluginException("Route serviceIds is empty");
} }
String[] serviceIdArray = null; String[] serviceIdArray = null;
try { try {
serviceIdArray = StringUtils.split(serviceIds, PluginConstant.SEPARATE); serviceIdArray = StringUtils.split(routeServiceIds, PluginConstant.SEPARATE);
} catch (Exception e) { } catch (Exception e) {
throw new PluginException("Service ids must be separated with '" + PluginConstant.SEPARATE + "'", e); throw new PluginException("Route serviceIds must be separated with '" + PluginConstant.SEPARATE + "'", e);
} }
RouterEntity firstRouterEntity = getRouterEntity(); RouterEntity firstRouterEntity = getRouterEntity();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment