Creates a
Config from loading two files based on the given app ID and environment arguments. The base
file that will be loaded must be named
[appId].[conf/json/properties], e.g. if the appId was
foothen the base file loaded must be named foo.conf, foo.json, or foo.properties as per Typesafe Config's
specifications. Then the environment file is loaded, and it must be named
[appId]-[environment].[conf/json/properties]. Continuing the example, if appId was
foo and environment
was
bar, then the environment loaded must be named foo-bar.conf, foo-bar.json, or foo-bar.properties. The
returned
Config object is just the environment file's
Config setup with the base file's
Config used as a fallback via
Config#withFallback(ConfigMergeable). In other words, the environment file
and base file's properties are merged, with the environment file's properties winning any conflicts where a
property exists in both files.
NOTE:
ConfigFactory#load(String) is used to load the files, so System properties will override anything
specified in either the base or environment file. See that method for more detailed information about the file
loading process.