Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can provider boot features external config placeholders in properties? #249

Closed
ghost opened this issue Aug 6, 2018 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Aug 6, 2018

I want to config as follow:

dubbo.registry.address=zookeeper://${ZOOKEEPER_ADDRESS:192.168.199.202}:2181?client=curator

when start I get follow error:

java.lang.NumberFormatException: For input string: "192.168.199.202}:2181"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[na:1.8.0_05]
	at java.lang.Integer.parseInt(Integer.java:580) ~[na:1.8.0_05]
	at java.lang.Integer.parseInt(Integer.java:615) ~[na:1.8.0_05]
	at com.alibaba.dubbo.common.URL.valueOf(URL.java:239) ~[dubbo-2.6.2.jar:2.6.2]
	at com.alibaba.dubbo.common.utils.UrlUtils.parseURL(UrlUtils.java:68) ~[dubbo-2.6.2.jar:2.6.2]
	at com.alibaba.dubbo.common.utils.UrlUtils.parseURLs(UrlUtils.java:137) ~[dubbo-2.6.2.jar:2.6.2]
	at com.alibaba.dubbo.config.AbstractInterfaceConfig.loadRegistries(AbstractInterfaceConfig.java:190) ~[dubbo-2.6.2.jar:2.6.2]
	at com.alibaba.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:356) ~[dubbo-2.6.2.jar:2.6.2]
	at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:317) ~[dubbo-2.6.2.jar:2.6.2]
	at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:216) ~[dubbo-2.6.2.jar:2.6.2]
	at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:123) ~[dubbo-2.6.2.jar:2.6.2]
	at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:49) ~[dubbo-2.6.2.jar:2.6.2]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE]
	

reference:

@mercyblitz mercyblitz self-assigned this Aug 8, 2018
@mercyblitz mercyblitz added the bug Something isn't working label Aug 8, 2018
@mercyblitz mercyblitz added this to the 0.1.2 & 0.2.1 milestone milestone Aug 8, 2018
@mercyblitz
Copy link
Contributor

Please update dependencies in your Maven pom.xml, like this:

<dependency>
    <groupId>com.alibaba.boot</groupId>
    <artifactId>dubbo-spring-boot-starter</artifactId>
    <version>0.2.0</version>
</dependency>

<!-- Dubbo -->
<dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>dubbo</artifactId>
    <version>2.6.5</version>
</dependency>
<!-- Spring Context Extras -->
<dependency>
    <groupId>com.alibaba.spring</groupId>
    <artifactId>spring-context-support</artifactId>
    <version>1.0.2</version>
</dependency>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant