我使用Apache配置以下配置设置:是否有阿帕奇PropertiesConfiguration使用占位的方式
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.PropertiesConfiguration;
Configuration config = new PropertiesConfiguration("config.properties");
我想知道是否有某种方式使用占位符的属性文件?例如,我想有这样的:
some.message = You got a message: {0}
并能够在为{0}
占位符的值传递。通常情况下,您通常可以执行类似config.getString("some.message", String[] of values)
的操作,但不会看到类似的内容。