cvictory edited a comment 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:  
   
   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:  
   
   
   
![2](https://user-images.githubusercontent.com/4089452/45801237-df9de600-bce5-11e8-8e20-02caea1705f6.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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to