9.9. 在使用者客户端中使用 Service Registry 模式
这个步骤描述了如何将 Java 使用者客户端配置为使用 Service Registry 中的 schema。
步骤
为客户端配置服务注册表的 URL。
例如:
String registryUrl_node1 = PropertiesUtil.property(clientProperties, "registry.url.node1", "https://my-cluster-service-registry-myproject.example.com/api"); RegistryService service = RegistryClient.cached(registryUrl);
String registryUrl_node1 = PropertiesUtil.property(clientProperties, "registry.url.node1", "https://my-cluster-service-registry-myproject.example.com/api"); RegistryService service = RegistryClient.cached(registryUrl);
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 使用 Service Registry deserializer 服务配置客户端。
例如:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow