scala - How reuse properties in tyesafe config files? -



scala - How reuse properties in tyesafe config files? -

consider next files:

application.conf

app { port = 5000 }

reference.conf

akka { cluster { seed-nodes = ["akka.tcp://sysname@localhost:"${app.port}] } }

so when run configfactory.load() fails, because ${app.port} not nowadays in reference.conf.

but load algorithm clear - reference.conf loaded , merged application.conf. there way load application.conf , "include" reference.conf it?

important

i tried add together include "reference.conf" @ first line in application.conf not help.

you can utilize file("") syntax include file.

include file("reference.conf")

see https://github.com/typesafehub/config/blob/master/hocon.md#include-syntax

scala properties akka config

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -