Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.7.8

Operating System version: deepin

Java version: 1.8.0_261

Steps to reproduce this issue

org.apache.dubbo.rpc.cluster.router.tag.TagRouter#route In the list of provider URLs obtained, parameters dubbo.tag The value of the tag route is the same, which causes the tag routing not to work normally

Issue 2:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

问题描述

使用注解开发dubbo的服务端和消费端。当服务端暴露多个协议的时候，dubbo客户端@reference无法指定协议去消费。但是在dubbo的消费XML配置方式是支持的

<dubbo:reference id="userService" interface="com.jiangzz.service.IUserService" protocol="dubbo"/>

但是@Refernece目前没有注解支持改配置信息，希望官方有时间修正该问题！

环境

Dubbo version: 2.6.2

Operating System version: win7

Java version: 1.8.0_161

创建服务端，同时支持三种协议

服务端：

@Service(protocol = {"dubbo","rmi","rest"})
@Path(value = "users")
public class UserService implements IUserService {
@GET
@Path(value = "queryUserById")
@Produces(value = {"application/json;charset=utf-8"})
public User queryUser(@QueryParam(value = "id") Integer id) {
User user=new User();
user.setId(id+"");
user.setBirthDay(new Date());
user.setName("张三");
return user;
}
}

@Configuration
@DubboComponentScan(basePackages = {"com.jiangzz.service.impl"})
public class DubboConfig {
@Bean
public ApplicationConfig applicationConfig() {
ApplicationConfig applicationConfig = new ApplicationConfig();
applicationConfig.setName("provider-test");
return applicationConfig;
}

@Bean("dubbo")
public ProtocolConfig protocolConfig0(){
ProtocolConfig protocolConfig=new ProtocolConfig("dubbo");
protocolConfig.setPort(20880);
protocolConfig.setServer("netty4");
return protocolConfig;
}
@Bean("rmi")
public ProtocolConfig protocolConfig1(){
ProtocolConfig protocolConfig=new ProtocolConfig("rmi");
protocolConfig.setPort(20881);
protocolConfig.setServer("netty4");
return protocolConfig;
}
@Bean("rest")
public ProtocolConfig protocolConfig2(){
ProtocolConfig protocolConfig=new ProtocolConfig("rest");
protocolConfig.setPort(8080);
protocolConfig.setServer("netty4");
protocolConfig.setContextpath("/services");
protocolConfig.setServer("netty");
return protocolConfig;
}
@Bean
public RegistryConfig registryConfig() {
RegistryConfig registryConfig = new RegistryConfig();
registryConfig.setAddress("zookeeper://192.168.65.135:2181");
registryConfig.setClient("curator");
return registryConfig;
}
}

客户端：

@Configuration
@DubboComponentScan(basePackages = "com.jiangzz.service")
public class DubboConfig {
@Reference
private IUserService userService;
@Bean
public IUserService userService(){
return userService;
}
@Bean
public ApplicationConfig applicationConfig() {
ApplicationConfig applicationConfig = new ApplicationConfig();
applicationConfig.setName("consumer-test");
return applicationConfig;
}
@Bean
public ConsumerConfig consumerConfig() {
ConsumerConfig consumerConfig = new ConsumerConfig();
consumerConfig.setTimeout(3000);
consumerConfig.setClient("netty4");

return consumerConfig;
}
@Bean
public RegistryConfig registryConfig() {
RegistryConfig registryConfig = new RegistryConfig();
registryConfig.setAddress("zookeeper://192.168.65.135:2181");
registryConfig.setClient("curator");
return registryConfig;
}
}

调用：

AnnotationConfigApplicationContext acc=new AnnotationConfigApplicationContext(DubboConfig.class);
IUserService bean = acc.getBean(IUserService.class);
for(int i=0;i<1000;i++){
User user = bean.queryUser(1);
System.out.println(user);

}

###异常信息

Exception in thread "main" java.lang.RuntimeException: RESTEASY004530: Could not find a method for: public abstract com.jiangzz.entities.User com.jiangzz.service.IUserService.queryUser(java.lang.Integer)
at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(ClientProxy.java:74)
at com.sun.proxy.$Proxy31.queryUser(Unknown Source)
at com.alibaba.dubbo.common.bytecode.Wrapper0.invokeMethod(Wrapper0.java)
at com.alibaba.dubbo.rpc.proxy.javassist.JavassistProxyFactory$1.doInvoke(JavassistProxyFactory.java:47)
at com.alibaba.dubbo.rpc.proxy.AbstractProxyInvoker.invoke(AbstractProxyInvoker.java:76)
at com.alibaba.dubbo.rpc.protocol.AbstractProxyProtocol$2.doInvoke(AbstractProxyProtocol.java:97)
at com.alibaba.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:148)
at com.alibaba.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:75)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72)
at com.alibaba.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:54)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72)
at com.alibaba.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:48)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72)
at com.alibaba.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:77)
at com.alibaba.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:56)
at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:78)
at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:238)
at com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:75)
at com.alibaba.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:52)
at com.alibaba.dubbo.common.bytecode.proxy0.queryUser(proxy0.java)
at com.jiangzz.StartClientDemo.main(StartClientDemo.java:18)