Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nkorange committed Jan 23, 2019
1 parent 5f537c5 commit 5a68d60
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions naming/src/main/java/com/alibaba/nacos/naming/web/ApiCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,19 @@ public JSONObject rt4Dom(HttpServletRequest request) {
@RequestMapping("/ip4Dom2")
public JSONObject ip4Dom2(HttpServletRequest request) throws NacosException {

String namespaceId = WebUtils.optional(request, Constants.REQUEST_PARAM_NAMESPACE_ID,
UtilsAndCommons.getDefaultNamespaceId());
String domName = WebUtils.required(request, "dom");
String key = WebUtils.required(request, "dom");

String domName;

String namespaceId;

if (key.contains(UtilsAndCommons.SERVICE_GROUP_CONNECTOR)) {
namespaceId = key.split(UtilsAndCommons.SERVICE_GROUP_CONNECTOR)[0];
domName = key.split(UtilsAndCommons.SERVICE_GROUP_CONNECTOR)[1];
} else {
namespaceId = UtilsAndCommons.getDefaultNamespaceId();
domName = key;
}

VirtualClusterDomain dom = (VirtualClusterDomain) domainsManager.getDomain(namespaceId, domName);

Expand Down

0 comments on commit 5a68d60

Please sign in to comment.