3

How can I handle very long strings in Play's application.conf? Suppose I have:

my.value.param = "Very very very very long line"

and I want to split long line like

my.value.param = "Very very very "
               + "very long line"

How can I do this using HOCON format? Thanks

selfsx
  • 581
  • 7
  • 23

2 Answers2

4

From the documentation it appears to not be possible in that way. You could work around it slightly, like this:

my.value.param = ${my.value.param1} ${my.value.param2}
my.value.param1="Very very very"
my.value.param2="very long line"

But this is very ugly, of course. I don't think it was ever the intention to have long strings stored in the configuration.

Michael Zajac
  • 55,144
  • 7
  • 113
  • 138
4
build.path = ${PATH}
build.path = ${build.path}":/opt/groovy-2.4.5/bin"
build.path = ${build.path}":/opt/gradle-2.9/bin"
build.path = ${build.path}":/opt/scala-2.11.7/bin"
build.path = ${build.path}":/opt/sbt-0.13.9/bin"
kramer
  • 41
  • 1