Is there a way to move node to root in HOCON?

I am using config config and I am looking for an easy way to allow additional property overrides in configuration files that are shared between applications.

So let's say I have 2 applications, A and B. They both use the Z module. They both load the shared configuration file "shared.conf".

Module Z has the property defined in it reference.conf

z.foo=bar 

I would like to be able

 #override the property for both A & B z.foo=zap 

or

 #override the property for just A azfoo=zip 

I know that I can only do this for the prefix 'z' in the application.conf of each application. eg.

 z = ${?az} 

but I was hoping there was a way to go all the way to the root of the node. eg.

 MAGICAL_ROOT = ${?a} 

I hope that is possible?

+5
source share

Source: https://habr.com/ru/post/1259532/


All Articles