dubbo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] zhouzhipeng commented on a change in pull request #1511: 增加特性:动态获取Reference服务类
Date Mon, 26 Mar 2018 13:22:30 GMT
zhouzhipeng commented on a change in pull request #1511: 增加特性:动态获取Reference服务类
URL: https://github.com/apache/incubator-dubbo/pull/1511#discussion_r177085712
 
 

 ##########
 File path: dubbo-config/dubbo-config-spring/src/main/java/com/alibaba/dubbo/config/spring/AnnotationBean.java
 ##########
 @@ -96,6 +96,14 @@ public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
                 // spring 2.0
             }
         }
+
+
+        //
+        if(!beanFactory.containsBean(DynamicReferenceService.class.getName())) {
+            //注册服务bean
+            beanFactory.registerSingleton(DynamicReferenceService.class.getName(), new DynamicReferenceService(this));
 
 Review comment:
   I got some fuzzy for what you said.  DynamicReferenceService  is a singleton in Spring
container , it will be initialized  only once when the spring context startup. So , how can
"the DynamicReferenceService injection is overrided" ? 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message