我使用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)
的操作,但不會看到類似的內容。