fix bug
This commit is contained in:
parent
408b36307d
commit
6a9b414315
@ -162,4 +162,6 @@ public class Constants {
|
|||||||
public static final String NULL_STRING = "null";
|
public static final String NULL_STRING = "null";
|
||||||
|
|
||||||
public static final String NUMBER_PATTERN = "^\\d+$";
|
public static final String NUMBER_PATTERN = "^\\d+$";
|
||||||
|
|
||||||
|
public static final String ANY_PATTERN = ".*";
|
||||||
}
|
}
|
||||||
|
@ -684,7 +684,11 @@ public class ServiceManager implements RecordListener<Service> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(serviceName)) {
|
if (StringUtils.isNotBlank(serviceName)) {
|
||||||
matchList = searchServices(namespaceId, ".*" + serviceName + ".*");
|
StringJoiner regex = new StringJoiner(Constants.SERVICE_INFO_SPLITER);
|
||||||
|
for (String param : serviceName.split(Constants.SERVICE_INFO_SPLITER)) {
|
||||||
|
regex.add(StringUtils.isBlank(param) ? Constants.ANY_PATTERN : Constants.ANY_PATTERN + param + Constants.ANY_PATTERN);
|
||||||
|
}
|
||||||
|
matchList = searchServices(namespaceId, regex.toString());
|
||||||
} else {
|
} else {
|
||||||
matchList = new ArrayList<>(chooseServiceMap(namespaceId).values());
|
matchList = new ArrayList<>(chooseServiceMap(namespaceId).values());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user