Skip to content

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

@ghost

Description

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:

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions