dangdangdotcom / dubbox

Dubbox now means Dubbo eXtensions, and it adds features like RESTful remoting, Kyro/FST serialization, etc to the Dubbo service framework.
http://dangdangdotcom.github.io/dubbox
Apache License 2.0
4.89k stars 2.06k forks source link

rest 服务,消费者使用注解@Reference 提示没有生产者? #298

Open LinSheng0719 opened 7 years ago

LinSheng0719 commented 7 years ago

生产者使用两种协议,如下的注解方式

@Service(protocol = {"dubbo","rest"}, validation = "true",group = "annotationConfig") @Path("customers") @Consumes({MediaType.APPLICATION_JSON}) @Produces({ContentType.APPLICATION_JSON_UTF_8})

查看注册中心,确实有两个不同的协议的相同服务提供。

消费者 使用@Reference(group = "annotationConfig",protocol="dubbo")成功 使用@Reference(group = "annotationConfig",protocol="rest")失败