zrlw edited a comment on issue #8567: URL: https://github.com/apache/dubbo/issues/8567#issuecomment-904321568
也可以变通一下解决这个问题: 在DubboReference注解上加 parameters参数,同一个服务接口不同的Reference注解定义不同的参数,比如定义一个process参数,clientA用proc-a, clientB用proc-b: ``` ClientA.java: @DubboReference( parameters = {"process", "proc-a"}, ...) DubboService s; ... ClientB.java: @DubboReference( parameters = {"process", "proc-b"}, ...) DubboService s; ``` clientA和clientB的回调方法放到统一的门面组件里,回调方法依据rpccontext的consumerUrl里取出process参数分别进行处理,比如: ``` String process = RpcContext.getContext().getConsumerUrl.getParameter("process"); switch (process) { case "proc-a": .... case "proc-b": .... } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org