我需要在我的类型安全配置中包含一些属性文件,比如
include ${user.HOME}"/.app/db-test.conf"
然而解析器抱怨:
com.typesafe.config.ConfigException$Parse: dev/application.conf: 47: include keyword is not followed by a quoted string, but by: '${'user.HOME'}'
com.typesafe.config.ConfigException$Parse: dev/application.conf: 47: include keyword is not followed by a quoted string, but by: '${'user.HOME'}'
at com.typesafe.config.impl.Parser$ParseContext.parseError(Parser.java:329)
at com.typesafe.config.impl.Parser$ParseContext.parseError(Parser.java:325)
at com.typesafe.config.impl.Parser$ParseContext.parseInclude(Parser.java:574)
at com.typesafe.config.impl.Parser$ParseContext.parseObject(Parser.java:624)
at com.typesafe.config.impl.Parser$ParseContext.parseValue(Parser.java:408)
at com.typesafe.config.impl.Parser$ParseContext.parseObject(Parser.java:657)
at com.typesafe.config.impl.Parser$ParseContext.parse(Parser.java:832)
at com.typesafe.config.impl.Parser.parse(Parser.java:34)
如何在包含语句中使用系统属性/环境变量?