在 application.conf 我添加了以下属性
property1="value1"
property2="prefix ${property1}"
在任何控制器中,我添加了以下代码
println(Play.application.configuration.underlying.getString("property1"))
println(Play.application.configuration.underlying.getString("property2"))
println(Play.application.configuration.getString("property1"))
println(Play.application.configuration.getString("property2"))
输出是
value1
prefix ${property1}
Some(value1)
Some(prefix ${property1})