Skip to content

[BUG] @Reference#parameters() does not work #2301

Closed

Description

@mercyblitz
  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 2.6.3
  • Operating System version: all
  • Java version: all

Step to reproduce this issue

  1. To setting @Reference#parameters()

Expected Result

ReferenceBean contains parameters Map

Actual Result

ReferenceBean does not contain parameters Map

Activity

  1. added
    type/bug
    on Aug 15, 2018
  2. added this to the 2.6.4 milestone on Aug 15, 2018
  3. self-assigned this
    on Aug 15, 2018
  4. added a commit that references this issue on Aug 15, 2018
  5. diecui1202 commented on Sep 5, 2018

    @diecui1202

    @mercyblitz could u pls. send a PR?

  6. modified the milestones: 2.6.4, 2.6.5 on Sep 14, 2018
  7. cvictory commented on Sep 20, 2018

    @cvictory
    Contributor

    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

  8. cvictory commented on Sep 20, 2018

    @cvictory
    Contributor

    @mercyblitz please check this issue again.

    &READY-TO-CLOSE&

  9. cvictory commented on Oct 12, 2018

    @cvictory
    Contributor

    @mercyblitz I saw you have a commit to this issue. Maybe you should commit a dependent pr and related to this issue.

  10. modified the milestones: 2.6.5, 2.6.6 on Oct 29, 2018
  11. added a commit that references this issue on Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type/bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions