From c9cb1691f5f76e12a6c74f2badbfee862bea1c1d Mon Sep 17 00:00:00 2001 From: mercyblitz Date: Mon, 26 Aug 2019 17:00:09 +0800 Subject: [PATCH] Polish apache/dubbo#4942 : Dubbo Cloud Native supports multiple protcols --- .../NacosDubboServiceConsumerBootstrap.java | 4 +- .../NacosDubboServiceProviderBootstrap.java | 4 +- ...ookeeperDubboServiceConsumerBootstrap.java | 58 ++++++++++++ ...ookeeperDubboServiceProviderBootstrap.java | 38 ++++++++ .../client/ServiceDiscoveryRegistry.java | 52 +++++------ .../ProtocolPortsMetadataCustomizer.java | 51 +++++++++++ .../ServiceInstanceMetadataUtils.java | 89 ++++++++++--------- .../StandardMetadataServiceURLBuilder.java | 14 ++- ....registry.client.ServiceInstanceCustomizer | 1 + dubbo-registry/dubbo-registry-eureka/pom.xml | 13 +++ 10 files changed, 238 insertions(+), 86 deletions(-) create mode 100644 dubbo-bootstrap/src/test/java/org/apache/dubbo/bootstrap/ZookeeperDubboServiceConsumerBootstrap.java create mode 100644 dubbo-bootstrap/src/test/java/org/apache/dubbo/bootstrap/ZookeeperDubboServiceProviderBootstrap.java create mode 100644 dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/ProtocolPortsMetadataCustomizer.java diff --git a/dubbo-bootstrap/src/test/java/org/apache/dubbo/bootstrap/NacosDubboServiceConsumerBootstrap.java b/dubbo-bootstrap/src/test/java/org/apache/dubbo/bootstrap/NacosDubboServiceConsumerBootstrap.java index 1bddcd37e64..aeb8eb78356 100644 --- a/dubbo-bootstrap/src/test/java/org/apache/dubbo/bootstrap/NacosDubboServiceConsumerBootstrap.java +++ b/dubbo-bootstrap/src/test/java/org/apache/dubbo/bootstrap/NacosDubboServiceConsumerBootstrap.java @@ -32,11 +32,11 @@ public class NacosDubboServiceConsumerBootstrap { public static void main(String[] args) throws Exception { ApplicationConfig applicationConfig = new ApplicationConfig("dubbo-nacos-consumer-demo"); - applicationConfig.setMetadataType("remote"); +// applicationConfig.setMetadataType("remote"); new DubboBootstrap() .application(applicationConfig) // Zookeeper - .registry("nacos", builder -> builder.address("nacos://127.0.0.1:8848?registry.type=service&subscribed.services=dubbo-nacos-provider-demo")) + .registry("nacos", builder -> builder.address("nacos://127.0.0.1:8848?registry-type=service&subscribed-services=dubbo-nacos-provider-demo")) .metadataReport(new MetadataReportConfig("nacos://127.0.0.1:8848")) // Nacos // .registry("consul", builder -> builder.address("consul://127.0.0.1:8500?registry.type=service&subscribed.services=dubbo-provider-demo").group("namespace1")) diff --git a/dubbo-bootstrap/src/test/java/org/apache/dubbo/bootstrap/NacosDubboServiceProviderBootstrap.java b/dubbo-bootstrap/src/test/java/org/apache/dubbo/bootstrap/NacosDubboServiceProviderBootstrap.java index bd47a7e2a5c..bf49d6944c3 100644 --- a/dubbo-bootstrap/src/test/java/org/apache/dubbo/bootstrap/NacosDubboServiceProviderBootstrap.java +++ b/dubbo-bootstrap/src/test/java/org/apache/dubbo/bootstrap/NacosDubboServiceProviderBootstrap.java @@ -30,11 +30,11 @@ public class NacosDubboServiceProviderBootstrap { public static void main(String[] args) { ApplicationConfig applicationConfig = new ApplicationConfig("dubbo-nacos-provider-demo"); - applicationConfig.setMetadataType("remote"); +// applicationConfig.setMetadataType("remote"); new DubboBootstrap() .application(applicationConfig) // Zookeeper in service registry type - .registry("nacos", builder -> builder.address("nacos://127.0.0.1:8848?registry.type=service")) + .registry("nacos", builder -> builder.address("nacos://127.0.0.1:8848?registry-type=service")) // Nacos // .registry("nacos", builder -> builder.address("nacos://127.0.0.1:8848?registry.type=service")) // .registry(RegistryBuilder.newBuilder().address("etcd3://127.0.0.1:2379?registry.type=service").build()) diff --git a/dubbo-bootstrap/src/test/java/org/apache/dubbo/bootstrap/ZookeeperDubboServiceConsumerBootstrap.java b/dubbo-bootstrap/src/test/java/org/apache/dubbo/bootstrap/ZookeeperDubboServiceConsumerBootstrap.java new file mode 100644 index 00000000000..8b45c1f1c11 --- /dev/null +++ b/dubbo-bootstrap/src/test/java/org/apache/dubbo/bootstrap/ZookeeperDubboServiceConsumerBootstrap.java @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.dubbo.bootstrap; + +import org.apache.dubbo.bootstrap.rest.UserService; +import org.apache.dubbo.config.ReferenceConfig; +import org.apache.dubbo.config.context.ConfigManager; + +/** + * Dubbo Provider Bootstrap + * + * @since 2.7.4 + */ +public class ZookeeperDubboServiceConsumerBootstrap { + + public static void main(String[] args) throws Exception { + + new DubboBootstrap() + .application("zookeeper-dubbo-consumer") + .registry("zookeeper", builder -> builder.address("zookeeper://127.0.0.1:2181?registry-type=service&subscribed-services=zookeeper-dubbo-provider")) + .reference("echo", builder -> builder.interfaceClass(EchoService.class).protocol("dubbo")) + .reference("user", builder -> builder.interfaceClass(UserService.class).protocol("rest")) + .start() + .await(); + + ConfigManager configManager = ConfigManager.getInstance(); + + ReferenceConfig referenceConfig = configManager.getReference("echo"); + + EchoService echoService = referenceConfig.get(); + + ReferenceConfig referenceConfig2 = configManager.getReference("user"); + + UserService userService = referenceConfig2.get(); + + for (int i = 0; i < 500; i++) { + Thread.sleep(2000L); + System.out.println(echoService.echo("Hello,World")); + System.out.println(userService.getUser(i * 1L)); + } + + + } +} diff --git a/dubbo-bootstrap/src/test/java/org/apache/dubbo/bootstrap/ZookeeperDubboServiceProviderBootstrap.java b/dubbo-bootstrap/src/test/java/org/apache/dubbo/bootstrap/ZookeeperDubboServiceProviderBootstrap.java new file mode 100644 index 00000000000..87d548d913d --- /dev/null +++ b/dubbo-bootstrap/src/test/java/org/apache/dubbo/bootstrap/ZookeeperDubboServiceProviderBootstrap.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.dubbo.bootstrap; + +import org.apache.dubbo.bootstrap.rest.UserService; +import org.apache.dubbo.bootstrap.rest.UserServiceImpl; + +/** + * TODO + */ +public class ZookeeperDubboServiceProviderBootstrap { + + public static void main(String[] args) { + new DubboBootstrap() + .application("zookeeper-dubbo-provider") + .registry(builder -> builder.address("zookeeper://127.0.0.1:2181?registry-type=service")) + .protocol("dubbo", builder -> builder.port(-1).name("dubbo")) + .protocol("rest", builder -> builder.port(8082).name("rest")) + .service("echo", builder -> builder.interfaceClass(EchoService.class).ref(new EchoServiceImpl()).protocolIds("dubbo")) + .service("user", builder -> builder.interfaceClass(UserService.class).ref(new UserServiceImpl()).protocolIds("rest")) + .start() + .await(); + } +} diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistry.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistry.java index 98f3275e7ac..84b5a759f90 100644 --- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistry.java +++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistry.java @@ -76,10 +76,8 @@ import static org.apache.dubbo.metadata.WritableMetadataService.DEFAULT_EXTENSION; import static org.apache.dubbo.registry.client.ServiceDiscoveryFactory.getExtension; import static org.apache.dubbo.registry.client.metadata.ServiceInstanceMetadataUtils.getExportedServicesRevision; -import static org.apache.dubbo.registry.client.metadata.ServiceInstanceMetadataUtils.getMetadataServiceURLsParams; import static org.apache.dubbo.registry.client.metadata.ServiceInstanceMetadataUtils.getMetadataStorageType; -import static org.apache.dubbo.registry.client.metadata.ServiceInstanceMetadataUtils.getProviderHost; -import static org.apache.dubbo.registry.client.metadata.ServiceInstanceMetadataUtils.getProviderPort; +import static org.apache.dubbo.registry.client.metadata.ServiceInstanceMetadataUtils.getProtocolPort; /** * {@link ServiceDiscoveryRegistry} is the service-oriented {@link Registry} and dislike the traditional one that @@ -419,33 +417,27 @@ private List cloneSubscribedURLs(URL subscribedURL, Collection { - List templateURLs = getTemplateURLs(subscribedURL, serviceInstance); - // The parameters of URLs that the MetadataService exported - Map> serviceURLsParams = getMetadataServiceURLsParams(serviceInstance); - - serviceURLsParams.forEach((protocol, parametersMap) -> { - templateURLs.stream() - .filter(templateURL -> isCompatibleProtocol(protocol, templateURL)) - .map(templateURL -> templateURL.removeParameter(TIMESTAMP_KEY)) - .map(templateURL -> templateURL.removeParameter(PID_KEY)) - .map(templateURL -> { - - String host = getProviderHost(parametersMap); - Integer port = getProviderPort(parametersMap); - - if (Objects.equals(templateURL.getHost(), host) - && Objects.equals(templateURL.getPort(), port)) { // use templateURL if equals - return templateURL; - } - - URLBuilder clonedURLBuilder = from(templateURL) // remove the parameters from the template URL - .setHost(host) // reset the host - .setPort(port); // reset the port - - return clonedURLBuilder.build(); - }) - .forEach(clonedURLs::add); - }); + String host = serviceInstance.getHost(); + + getTemplateURLs(subscribedURL, serviceInstance) + .stream() + .map(templateURL -> templateURL.removeParameter(TIMESTAMP_KEY)) + .map(templateURL -> templateURL.removeParameter(PID_KEY)) + .map(templateURL -> { + String protocol = templateURL.getProtocol(); + int port = getProtocolPort(serviceInstance, protocol); + if (Objects.equals(templateURL.getHost(), host) + && Objects.equals(templateURL.getPort(), port)) { // use templateURL if equals + return templateURL; + } + + URLBuilder clonedURLBuilder = from(templateURL) // remove the parameters from the template URL + .setHost(host) // reset the host + .setPort(port); // reset the port + + return clonedURLBuilder.build(); + }) + .forEach(clonedURLs::add); }); return clonedURLs; } diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/ProtocolPortsMetadataCustomizer.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/ProtocolPortsMetadataCustomizer.java new file mode 100644 index 00000000000..f7f8821005d --- /dev/null +++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/ProtocolPortsMetadataCustomizer.java @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.dubbo.registry.client.metadata; + +import org.apache.dubbo.common.URL; +import org.apache.dubbo.metadata.WritableMetadataService; +import org.apache.dubbo.registry.client.ServiceInstance; +import org.apache.dubbo.registry.client.ServiceInstanceCustomizer; +import org.apache.dubbo.rpc.Protocol; + +import static org.apache.dubbo.metadata.WritableMetadataService.getExtension; +import static org.apache.dubbo.registry.client.metadata.ServiceInstanceMetadataUtils.getMetadataStorageType; +import static org.apache.dubbo.registry.client.metadata.ServiceInstanceMetadataUtils.setProtocolPort; + +/** + * A Class to customize the ports of {@link Protocol protocols} into + * {@link ServiceInstance#getMetadata() the metadata of service instance} + * + * @since 2.7.4 + */ +public class ProtocolPortsMetadataCustomizer implements ServiceInstanceCustomizer { + + @Override + public void customize(ServiceInstance serviceInstance) { + + String metadataStoredType = getMetadataStorageType(serviceInstance); + + WritableMetadataService writableMetadataService = getExtension(metadataStoredType); + + writableMetadataService.getExportedURLs() + .stream() + .map(URL::valueOf) + .forEach(url -> { + setProtocolPort(serviceInstance, url.getProtocol(), url.getPort()); + }); + } +} diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/ServiceInstanceMetadataUtils.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/ServiceInstanceMetadataUtils.java index e3f3e4dd1d2..730d117f7f8 100644 --- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/ServiceInstanceMetadataUtils.java +++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/ServiceInstanceMetadataUtils.java @@ -20,6 +20,7 @@ import org.apache.dubbo.metadata.MetadataService; import org.apache.dubbo.metadata.WritableMetadataService; import org.apache.dubbo.registry.client.ServiceInstance; +import org.apache.dubbo.rpc.Protocol; import com.alibaba.fastjson.JSON; @@ -28,7 +29,6 @@ import java.util.List; import java.util.Map; -import static java.lang.String.valueOf; import static java.util.Collections.emptyMap; import static org.apache.dubbo.common.utils.StringUtils.isBlank; import static org.apache.dubbo.metadata.WritableMetadataService.DEFAULT_METADATA_STORAGE_TYPE; @@ -49,6 +49,16 @@ public class ServiceInstanceMetadataUtils { */ public static final String METADATA_SERVICE_PREFIX = "dubbo.metadata-service."; + /** + * The prefix of {@link Protocol} : "dubbo.protocols." + */ + public static final String DUBBO_PROTOCOLS_PREFIX = "dubbo.protocols."; + + /** + * The suffix of port : ".port"; + */ + public static final String DUBBO_PORT_SUFFIX = ".port"; + /** * The property name of metadata JSON of {@link MetadataService}'s {@link URL} */ @@ -76,16 +86,6 @@ public class ServiceInstanceMetadataUtils { */ public static String METADATA_STORAGE_TYPE_PROPERTY_NAME = "dubbo.metadata.storage-type"; - /** - * The property name of {@link URL url's} parameter name of Dubbo Provider host - */ - public static final String PROVIDER_HOST_PROPERTY_NAME = "provider.host"; - - /** - * The {@link URL url's} parameter name of Dubbo Provider port - */ - public static final String PROVIDER_PORT_PROPERTY_NAME = "provider.port"; - /** * Get the multiple {@link URL urls'} parameters of {@link MetadataService MetadataService's} Metadata * @@ -110,23 +110,6 @@ public static Map getMetadataServiceURLParams(ServiceInstance se return params.getOrDefault(protocol, emptyMap()); } - /** - * The provider port from {@link ServiceInstance the specified service instance} - * - * @param serviceInstance {@link ServiceInstance the specified service instance} - * @param protocol the protocol name - * @return The protocol port if found, or null - */ - public static Integer getProviderPort(ServiceInstance serviceInstance, String protocol) { - Map params = getMetadataServiceURLParams(serviceInstance, protocol); - return getProviderPort(params); - } - - public static String getProviderHost(ServiceInstance serviceInstance, String protocol) { - Map params = getMetadataServiceURLParams(serviceInstance, protocol); - return getProviderHost(params); - } - public static String getMetadataServiceParameter(List urls) { Map> params = new HashMap<>(); @@ -145,21 +128,9 @@ public static String getMetadataServiceParameter(List urls) { private static Map getParams(URL providerURL) { Map params = new LinkedHashMap<>(); setDefaultParams(params, providerURL); - // set provider host - setProviderHostParam(params, providerURL); - // set provider port - setProviderPortParam(params, providerURL); return params; } - public static String getProviderHost(Map params) { - return valueOf(params.get(PROVIDER_HOST_PROPERTY_NAME)); - } - - public static Integer getProviderPort(Map params) { - return Integer.valueOf(valueOf(params.get(PROVIDER_PORT_PROPERTY_NAME))); - } - /** * The revision for all exported Dubbo services from the specified {@link ServiceInstance}. * @@ -228,12 +199,42 @@ public static boolean isDubboServiceInstance(ServiceInstance serviceInstance) { || metadata.containsKey(METADATA_SERVICE_URLS_PROPERTY_NAME); } - private static void setProviderHostParam(Map params, URL providerURL) { - params.put(PROVIDER_HOST_PROPERTY_NAME, providerURL.getHost()); + /** + * Create the property name of Dubbo protocol port + * + * @param protocol the name of protocol, e.g, dubbo, rest, and so on + * @return e.g, "dubbo.protocols.dubbo.port" + */ + public static String createProtocolPortPropertyName(String protocol) { + return DUBBO_PROTOCOLS_PREFIX + protocol + DUBBO_PORT_SUFFIX; } - private static void setProviderPortParam(Map params, URL providerURL) { - params.put(PROVIDER_PORT_PROPERTY_NAME, valueOf(providerURL.getPort())); + /** + * Set the protocol port into {@link ServiceInstance#getMetadata() the metadata of service instance} + * + * @param serviceInstance {@link ServiceInstance service instance} + * @param protocol the name of protocol, e.g, dubbo, rest, and so on + * @param port the port of protocol + */ + public static void setProtocolPort(ServiceInstance serviceInstance, String protocol, int port) { + Map metadata = serviceInstance.getMetadata(); + String propertyName = createProtocolPortPropertyName(protocol); + metadata.put(propertyName, Integer.toString(port)); + } + + /** + * Get the property value of port by the specified {@link ServiceInstance#getMetadata() the metadata of + * service instance} and protocol + * + * @param serviceInstance {@link ServiceInstance service instance} + * @param protocol the name of protocol, e.g, dubbo, rest, and so on + * @return if not found, return null + */ + public static Integer getProtocolPort(ServiceInstance serviceInstance, String protocol) { + Map metadata = serviceInstance.getMetadata(); + String propertyName = createProtocolPortPropertyName(protocol); + String propertyValue = metadata.get(propertyName); + return propertyValue == null ? null : Integer.valueOf(propertyValue); } /** diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/StandardMetadataServiceURLBuilder.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/StandardMetadataServiceURLBuilder.java index 48022af20a6..d420ff9f02f 100644 --- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/StandardMetadataServiceURLBuilder.java +++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/StandardMetadataServiceURLBuilder.java @@ -27,8 +27,7 @@ import static java.lang.String.valueOf; import static org.apache.dubbo.registry.client.metadata.ServiceInstanceMetadataUtils.getMetadataServiceURLsParams; -import static org.apache.dubbo.registry.client.metadata.ServiceInstanceMetadataUtils.getProviderHost; -import static org.apache.dubbo.registry.client.metadata.ServiceInstanceMetadataUtils.getProviderPort; +import static org.apache.dubbo.registry.client.metadata.ServiceInstanceMetadataUtils.getProtocolPort; /** * The {@link MetadataServiceURLBuilder} implementation for The standard Dubbo scenario @@ -51,14 +50,13 @@ public List build(ServiceInstance serviceInstance) { List urls = new ArrayList<>(paramsMap.size()); - for (Map.Entry> entry : paramsMap.entrySet()) { + String host = serviceInstance.getHost(); - URLBuilder urlBuilder = new URLBuilder(); + for (Map.Entry> entry : paramsMap.entrySet()) { String protocol = entry.getKey(); - Map urlParams = entry.getValue(); - String host = getProviderHost(urlParams); - Integer port = getProviderPort(urlParams); - urlBuilder.setHost(host) + Integer port = getProtocolPort(serviceInstance, protocol); + URLBuilder urlBuilder = new URLBuilder() + .setHost(host) .setPort(port) .setProtocol(protocol) .setPath(MetadataService.class.getName()); diff --git a/dubbo-registry/dubbo-registry-api/src/main/resources/META-INF/services/org.apache.dubbo.registry.client.ServiceInstanceCustomizer b/dubbo-registry/dubbo-registry-api/src/main/resources/META-INF/services/org.apache.dubbo.registry.client.ServiceInstanceCustomizer index 7b068938bfb..a83cb724153 100644 --- a/dubbo-registry/dubbo-registry-api/src/main/resources/META-INF/services/org.apache.dubbo.registry.client.ServiceInstanceCustomizer +++ b/dubbo-registry/dubbo-registry-api/src/main/resources/META-INF/services/org.apache.dubbo.registry.client.ServiceInstanceCustomizer @@ -2,3 +2,4 @@ org.apache.dubbo.registry.client.metadata.MetadataServiceURLParamsMetadataCustom org.apache.dubbo.registry.client.metadata.ExportedServicesRevisionMetadataCustomizer org.apache.dubbo.registry.client.metadata.SubscribedServicesRevisionMetadataCustomizer org.apache.dubbo.registry.client.metadata.RefreshServiceMetadataCustomizer +org.apache.dubbo.registry.client.metadata.ProtocolPortsMetadataCustomizer diff --git a/dubbo-registry/dubbo-registry-eureka/pom.xml b/dubbo-registry/dubbo-registry-eureka/pom.xml index cd4181da7f0..79bbc22c318 100644 --- a/dubbo-registry/dubbo-registry-eureka/pom.xml +++ b/dubbo-registry/dubbo-registry-eureka/pom.xml @@ -27,7 +27,20 @@ com.netflix.eureka eureka-client + + + javax.ws.rs + jsr311-api + + + + + javax.ws.rs + javax.ws.rs-api + 2.1 + + javax.inject javax.inject