0

In application.conf I added the following properties

property1="value1"
property2="prefix ${property1}"

In any controller I added the following code

  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"))

The output is

value1
prefix ${property1}
Some(value1)
Some(prefix ${property1})
raisercostin
  • 8,777
  • 5
  • 67
  • 76

1 Answers1

1

The problem is that the property2 is not substituted since is quoted.

Use

property1="value1"
property2=prefix ${property1}

See unquoted string section.

raisercostin
  • 8,777
  • 5
  • 67
  • 76