【发布时间】:2015-11-19 05:09:51
【问题描述】:
我有一个这样的属性文件
url.DEV.a=devlocalhost
url.QA.a=qalocalhost
env=DEV
要获取 url,我正在使用以下属性。但我无法获得正确的值。
totalurl=${url.${env}.a}
这里我期望 totalurl 为 devlocalhost
如何在属性文件中做到这一点。
【问题讨论】:
标签: properties properties-file
我有一个这样的属性文件
url.DEV.a=devlocalhost
url.QA.a=qalocalhost
env=DEV
要获取 url,我正在使用以下属性。但我无法获得正确的值。
totalurl=${url.${env}.a}
这里我期望 totalurl 为 devlocalhost
如何在属性文件中做到这一点。
【问题讨论】:
标签: properties properties-file
您能否提供更多详细信息,为什么需要这样的配置? 使用存储通用属性的通用文件不是更容易吗?
【讨论】: