Modify ConfigLoader and ConfigParser so that the config is parsed only a single time. ConfigLoader.configBinder() can now be called to obtain the instance of a new class ConfigBinder, which can in turn be used to bind the already parsed config to multiple data classes, given a prefix.
Modify
ConfigLoader
andConfigParser
so that the config is parsed only a single time.ConfigLoader.configBinder()
can now be called to obtain the instance of a new classConfigBinder
, which can in turn be used to bind the already parsed config to multiple data classes, given a prefix.This follows the general approach as suggested by @cloudshiftchris.
~This PR is stacked on top of https://github.com/sksamuel/hoplite/pull/414 and will be rebased and moved out of draft once that PR is merged.~
Replaced by PR https://github.com/sksamuel/hoplite/pull/422.