3

如何在 Play 的 application.conf 中处理很长的字符串?假设我有:

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

我想像这样分割长线

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

如何使用 HOCON 格式执行此操作?谢谢

4

2 回答 2

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"
于 2015-12-11T03:31:27.610 回答
3

文档来看,这种方式似乎是不可能的。您可以稍微解决它,如下所示:

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

但这当然是非常丑陋的。我不认为将长字符串存储在配置中是有意的。

于 2014-06-22T13:20:40.787 回答