Resolving the placeholders(with default value) of XML BeanDefinition in the Configuration Class
- [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
- 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}"/>
- 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
这个问题,别想了社区不准备修了。来参考https://github.com/open-wrapper/dubbo-wrapper
This issue has been fixed in 2.7.8.
This issue still exist in 2.7.8, please follow the steps to reproduce the problem. @mercyblitz @chickenlj
I can't re-open the issue, but the problem not been fixed.
https://github.com/open-wrapper/dubbo-wrapper 修复了上述问题,见Parser
This problem has been resolved in Dubbo3.0: https://github.com/apache/dubbo/pull/7383