public interface ConfigSeeder
Multibinder.newSetBinder(binder(), ConfigSeeder.class, RuntimeLayer.class)
.addBinding().toInstance(new ConfigSeeder() {
public Config get(Config mainConfig) {
return MapConfig.from(props));
}
});
will load properties from 'prop' into the RuntimeLayer.
Note that get(Config) receives the root configuration
as a parameter. This enables the seeder to set properties based on the current
state of the root composite config. Note that ConfigSeeders are invoked in the
order in which they are bound.| Modifier and Type | Method and Description |
|---|---|
com.netflix.archaius.Config |
get(com.netflix.archaius.Config rootConfig)
Return a Config to load into the layer indicated by the binding.
|
com.netflix.archaius.Config get(com.netflix.archaius.Config rootConfig)
throws java.lang.Exception
rootConfig - Current state of the root Config to be used for any
property loading or interpoltion needed by the ConfigResolverjava.lang.Exception