Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PlayFramework Configuration - Long Strings

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

like image 575
selfsx Avatar asked Jan 19 '26 17:01

selfsx


2 Answers

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.

like image 180
Michael Zajac Avatar answered Jan 22 '26 10:01

Michael Zajac


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"
like image 22
kramer Avatar answered Jan 22 '26 11:01

kramer