Search in sources :

Example 1 with ConfigurationProcessor

use of com.walmartlabs.ollie.config.ConfigurationProcessor in project concord by walmartlabs.

the class MigrateDB method main.

public static void main(String[] args) throws Exception {
    EnvironmentSelector environmentSelector = new EnvironmentSelector();
    Config cfg = new ConfigurationProcessor("concord-server", environmentSelector.select()).process();
    Injector injector = Guice.createInjector(new WireModule(new SpaceModule(new URLClassSpace(MigrateDB.class.getClassLoader()), BeanScanning.CACHE), new OllieConfigurationModule("com.walmartlabs.concord.server", cfg), new DatabaseModule()));
    new MigrateDB().run(injector);
}
Also used : OllieConfigurationModule(com.walmartlabs.ollie.config.OllieConfigurationModule) WireModule(org.eclipse.sisu.wire.WireModule) EnvironmentSelector(com.walmartlabs.ollie.config.EnvironmentSelector) Config(com.typesafe.config.Config) Injector(com.google.inject.Injector) ConfigurationProcessor(com.walmartlabs.ollie.config.ConfigurationProcessor) DatabaseModule(com.walmartlabs.concord.db.DatabaseModule) URLClassSpace(org.eclipse.sisu.space.URLClassSpace) SpaceModule(org.eclipse.sisu.space.SpaceModule)

Example 2 with ConfigurationProcessor

use of com.walmartlabs.ollie.config.ConfigurationProcessor in project concord by walmartlabs.

the class ConfigurationModule method configure.

@Override
protected void configure() {
    Environment env = new EnvironmentSelector().select();
    com.typesafe.config.Config config = new ConfigurationProcessor("concord-server", env, null, null).process();
    install(new OllieConfigurationModule("com.walmartlabs.concord.server", config));
}
Also used : OllieConfigurationModule(com.walmartlabs.ollie.config.OllieConfigurationModule) EnvironmentSelector(com.walmartlabs.ollie.config.EnvironmentSelector) ConfigurationProcessor(com.walmartlabs.ollie.config.ConfigurationProcessor) Environment(com.walmartlabs.ollie.config.Environment)

Aggregations

ConfigurationProcessor (com.walmartlabs.ollie.config.ConfigurationProcessor)2 EnvironmentSelector (com.walmartlabs.ollie.config.EnvironmentSelector)2 OllieConfigurationModule (com.walmartlabs.ollie.config.OllieConfigurationModule)2 Injector (com.google.inject.Injector)1 Config (com.typesafe.config.Config)1 DatabaseModule (com.walmartlabs.concord.db.DatabaseModule)1 Environment (com.walmartlabs.ollie.config.Environment)1 SpaceModule (org.eclipse.sisu.space.SpaceModule)1 URLClassSpace (org.eclipse.sisu.space.URLClassSpace)1 WireModule (org.eclipse.sisu.wire.WireModule)1