dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

Resolving the placeholders(with default value) of XML BeanDefinition in the Configuration Class

Open shenyyi opened this issue 6 years ago • 6 comments

  • [X ] I have searched the issues of this repository and believe that this is not a duplicate.
  • [X ] I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 2.7.7 & master
  • Operating System version: linux
  • Java version: JDK8

Steps to reproduce this issue

  1. update https://github.com/apache/dubbo/blob/master/dubbo-config/dubbo-config-spring/src/test/resources/org/apache/dubbo/config/spring/demo-provider.xml from <dubbo:protocol name="${dubbo.protocol.name}" port="${dubbo.protocol.port}"/> to <dubbo:protocol name="${dubbo.protocol.name}" port="${dubbo.protocol.port:8080}"/>
  2. run testProviderXml() in https://github.com/apache/dubbo/blob/master/dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/schema/DubboNamespaceHandlerTest.java

Expected Result

UT should pass

Actual Result

UT fail as flow: java.lang.AssertionError: Expected: is <20813> but: was <8080> Expected :is <20813> Actual :<8080>

This issue may related with previous issue or change: https://github.com/apache/dubbo/issues/6035 https://github.com/apache/dubbo/pull/6079

shenyyi avatar Aug 01 '20 14:08 shenyyi

这个问题,别想了社区不准备修了。来参考https://github.com/open-wrapper/dubbo-wrapper

CodeIngL avatar Aug 03 '20 07:08 CodeIngL

This issue has been fixed in 2.7.8.

mercyblitz avatar Aug 28 '20 06:08 mercyblitz

This issue still exist in 2.7.8, please follow the steps to reproduce the problem. @mercyblitz @chickenlj

shenyyi avatar Aug 31 '20 11:08 shenyyi

I can't re-open the issue, but the problem not been fixed.

shenyyi avatar Aug 31 '20 11:08 shenyyi

https://github.com/open-wrapper/dubbo-wrapper 修复了上述问题,见Parser

CodeIngL avatar Aug 31 '20 12:08 CodeIngL

This problem has been resolved in Dubbo3.0: https://github.com/apache/dubbo/pull/7383

kylixs avatar Mar 19 '21 03:03 kylixs