Mar*_*ian 47 java parameters properties include
看看我的"file.properties":
key1= My name is
key2= ${key1} Martin !
Run Code Online (Sandbox Code Playgroud)
为什么当我得到"key2"的值时,我的结果是"$ {key1} Martin!" 不像"我的名字是马丁!"
=>我在Java 6中编程
=>我使用java.util.Properties
ZZ *_*der 29
您可能需要查看Apache配置,
http://commons.apache.org/configuration/
它支持的众多功能中包括可变插值.
Tho*_*ens 14
使用Java Properties
类是不可能的.
属性键和值只是字符串.它们没有处理,因此您无法引用值中的其他值.