use of io.dropwizard.configuration.EnvironmentVariableSubstitutor in project zucchini-ui by pgentile.
the class BackendBundle method initialize.
@Override
public void initialize(final Bootstrap<?> bootstrap) {
// Enable variable substitution with environment variables
bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false)));
// Configure Jackson mapper
bootstrap.getObjectMapper().disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS).setSerializationInclusion(JsonInclude.Include.NON_NULL);
// Enable WebSockets for Jetty
bootstrap.addBundle(new WebSocketEnablerBundle());
// Register Spring context
applicationContext.register(BackendSpringConfig.class);
bootstrap.addBundle(new SpringBundle(applicationContext));
}
use of io.dropwizard.configuration.EnvironmentVariableSubstitutor in project pay-connector by alphagov.
the class ConnectorApp method initialize.
@Override
public void initialize(Bootstrap<ConnectorConfiguration> bootstrap) {
bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(NON_STRICT_VARIABLE_SUBSTITUTOR)));
bootstrap.addBundle(new MigrationsBundle<ConnectorConfiguration>() {
@Override
public DataSourceFactory getDataSourceFactory(ConnectorConfiguration configuration) {
return configuration.getDataSourceFactory();
}
});
bootstrap.addCommand(new DependentResourceWaitCommand());
bootstrap.addCommand(new RenderStateTransitionGraphCommand());
bootstrap.getObjectMapper().getSubtypeResolver().registerSubtypes(LogstashConsoleAppenderFactory.class);
bootstrap.getObjectMapper().getSubtypeResolver().registerSubtypes(GovUkPayDropwizardRequestJsonLogLayoutFactory.class);
}
use of io.dropwizard.configuration.EnvironmentVariableSubstitutor in project pay-ledger by alphagov.
the class LedgerApp method initialize.
@Override
public void initialize(Bootstrap<LedgerConfig> bootstrap) {
bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false)));
bootstrap.addBundle(new MigrationsBundle<>() {
@Override
public DataSourceFactory getDataSourceFactory(LedgerConfig configuration) {
return configuration.getDataSourceFactory();
}
});
bootstrap.addBundle(new JdbiExceptionsBundle());
bootstrap.addCommand(new DependentResourceWaitCommand());
bootstrap.getObjectMapper().getSubtypeResolver().registerSubtypes(LogstashConsoleAppenderFactory.class);
bootstrap.getObjectMapper().getSubtypeResolver().registerSubtypes(GovUkPayDropwizardRequestJsonLogLayoutFactory.class);
}
use of io.dropwizard.configuration.EnvironmentVariableSubstitutor in project pay-cardid by alphagov.
the class CardApi method initialize.
@Override
public void initialize(Bootstrap<CardConfiguration> bootstrap) {
bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false)));
bootstrap.getObjectMapper().getSubtypeResolver().registerSubtypes(LogstashConsoleAppenderFactory.class);
bootstrap.getObjectMapper().getSubtypeResolver().registerSubtypes(GovUkPayDropwizardRequestJsonLogLayoutFactory.class);
}
use of io.dropwizard.configuration.EnvironmentVariableSubstitutor in project bisq-api by mrosseel.
the class BisqApiApplication method initialize.
@Override
public void initialize(Bootstrap<ApiConfiguration> bootstrap) {
bootstrap.setConfigurationSourceProvider(new ResourceConfigurationSourceProvider());
bootstrap.addBundle(new SwaggerBundle<ApiConfiguration>() {
@Override
protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(ApiConfiguration configuration) {
return configuration.swaggerBundleConfiguration;
}
});
// Overriding settings through environment variables, added to override the http port from 8080 to something else
// See http://www.dropwizard.io/1.1.4/docs/manual/core.html#configuration
bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false)));
}
Aggregations