use of io.servicecomb.serviceregistry.api.registry.BasePath in project java-chassis by ServiceComb.
the class SchemaLoader method putSelfBasePathIfAbsent.
public void putSelfBasePathIfAbsent(String microserviceName, String basePath) {
if (basePath == null || basePath.length() == 0) {
return;
}
Microservice microservice = RegistryUtils.getMicroservice();
if (!microservice.getServiceName().equals(microserviceName)) {
return;
}
List<BasePath> paths = microservice.getPaths();
for (BasePath path : paths) {
if (path.getPath().equals(basePath)) {
return;
}
}
BasePath basePathObj = new BasePath();
basePathObj.setPath(basePath);
paths.add(basePathObj);
}
Aggregations