dubbo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] cvictory commented on issue #2301: [BUG] @Reference#parameters() does not work
Date Thu, 20 Sep 2018 06:58:59 GMT
cvictory commented on issue #2301: [BUG] @Reference#parameters() does not work
URL: https://github.com/apache/incubator-dubbo/issues/2301#issuecomment-423063355
 
 
   I write a demo to check this issue, but I found ReferenceBean has this parameter.
   
   modify dubbo configuration file :   
   ```
       <dubbo:annotation/>
       <context:component-scan base-package="com.alibaba.dubbo.demo.consumer">
           <context:include-filter type="annotation" expression="com.alibaba.dubbo.config.annotation.Reference"/>
       </context:component-scan>
   ```
   
   write service:  
   ```
   @Service
   public class ConsumerService {
   
       @Reference(parameters = {"k1", "v1"})
       private DemoService demoService;
   
       public void testReference() {
           System.out.println(demoService.sayHello("www.world"));
       }
   }
   ```
   
   And debug the referenceConfig, I found the parameter contain this key as follow:  
   
   I write a demo to check this issue, but I found ReferenceBean has this parameter.
   
   modify dubbo configuration file :   
   ```
       <dubbo:annotation/>
       <context:component-scan base-package="com.alibaba.dubbo.demo.consumer">
           <context:include-filter type="annotation" expression="com.alibaba.dubbo.config.annotation.Reference"/>
       </context:component-scan>
   ```
   
   write service:  
   ```
   @Service
   public class ConsumerService {
   
       @Reference(parameters = {"k1", "v1"})
       private DemoService demoService;
   
       public void testReference() {
           System.out.println(demoService.sayHello("www.world"));
       }
   }
   ```
   
   And debug the referenceConfig, I found the parameter contain this key as follow:  
   
   ![Uploading image.png…]()
   
   
   
   
   
   
   
   

----------------------------------------------------------------
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

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Mime
View raw message