You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "mooseen (GitHub)" <gi...@apache.org> on 2020/02/19 07:51:34 UTC

[GitHub] [dubbo] mooseen commented on issue #5755: dubbo update 2.5.3 to 2.7.5 some error

I also encountered this problem too that placeholder is not going to working in xml for reference bean. I found the reason of this issue is reference bean  has been early initialized when spring can't  infer the target type of factory bean and reference bean is type of factory bean. I has solved this issue by copy a `DubboBeanDefinitionParser` class  and override the default,and add follow codes in parse method:
```java
     else if(ReferenceBean.class.equals(beanClass)){
            String interfaceClassName = element.getAttribute("interface");
            if(StringUtils.isNotEmpty(interfaceClassName)){
                Class<?> interfaceClass = ReflectUtils.forName(interfaceClassName);
                beanDefinition.setTargetType(interfaceClass);
            }
        }
```
I have add a pull request for solve this issue, fixed #5710 

[ Full content available at: https://github.com/apache/dubbo/issues/5755 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org