public abstract class ConfigSeeders
extends java.lang.Object
| Constructor and Description |
|---|
ConfigSeeders() |
| Modifier and Type | Method and Description |
|---|---|
static void |
bind(com.google.inject.Binder binder,
com.netflix.archaius.Config config,
java.lang.Class<? extends java.lang.annotation.Annotation> annot)
Add a seeder for Properties to a specific annotated layer.
|
static void |
bind(com.google.inject.Binder binder,
java.util.Properties props,
java.lang.Class<? extends java.lang.annotation.Annotation> annot)
Add a seeder for Properties to a specific annotated layer.
|
public static void bind(com.google.inject.Binder binder,
java.util.Properties props,
java.lang.Class<? extends java.lang.annotation.Annotation> annot)
public class MyModule extends AbstractModule() {
protected void configure() {
Properties props = new Properties();
props.setProperty("name", "value");
ConfigSeeders.bind(binder(), props, RuntimeLayer.class);
}
}
binder - props - annot - public static void bind(com.google.inject.Binder binder,
com.netflix.archaius.Config config,
java.lang.Class<? extends java.lang.annotation.Annotation> annot)
public class MyModule extends AbstractModule() {
protected void configure() {
ConfigSeeders.bind(binder(),
MapConfig.builder()
.put("name", "value")
.build(),
RuntimeLayer.class);
}
}
binder - props - annot -