CrazyHZM commented on a change in pull request #8455: URL: https://github.com/apache/dubbo/pull/8455#discussion_r686627036
########## File path: dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java ########## @@ -247,26 +238,69 @@ protected synchronized void init() { this.refresh(); } - //init serivceMetadata + //init serviceMetadata initServiceMetadata(consumer); serviceMetadata.setServiceType(getServiceInterfaceClass()); // TODO, uncomment this line once service key is unified serviceMetadata.setServiceKey(URL.buildKey(interfaceName, group, version)); + Map<String, String> referenceParameters = appendConfig(); + + serviceMetadata.getAttachments().putAll(referenceParameters); + + ref = createProxy(referenceParameters); + + serviceMetadata.setTarget(ref); + serviceMetadata.addAttribute(PROXY_CLASS_REF, ref); + ServiceRepository repository = ApplicationModel.getServiceRepository(); ServiceDescriptor serviceDescriptor = repository.registerService(interfaceClass); repository.registerConsumer( Review comment: Has been adjusted, I feel that it can be optimized here. At that time, I will think about the process here -- 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