config
config copied to clipboard
Support substitution of environment variable for Java .properties
trafficstars
Environment variable substitution only works with HOCON (.conf). Standard Java properties, ${foo.bar} is interpreted as a literal string.
This isn't a backward-compatible change, so in some sense discussing the merits of it is academic, but the reason we didn't do this was to keep the existing spec for .properties files. Existing valid .properties files remain valid, instead of adding some sort of syntax extension. Similarly, JSON strings are interpreted in exactly the same way as before in .conf files, and only unquoted strings have substitutions.