Search in sources :

Example 6 with GuiceBundle

use of uk.gov.ida.hub.shared.guice.GuiceBundle in project verify-hub by alphagov.

the class SamlProxyApplication method initialize.

@Override
public final void initialize(Bootstrap<SamlProxyConfiguration> bootstrap) {
    // Enable variable substitution with environment variables
    bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false)));
    GuiceBundle<SamlProxyConfiguration> guiceBundle = new GuiceBundle<>(() -> asList(new SamlProxyModule(), new EventEmitterModule()), SamlProxyConfiguration.class);
    bootstrap.addBundle(guiceBundle);
    bootstrap.addBundle(new ServiceStatusBundle());
    bootstrap.addBundle(new MonitoringBundle());
    bootstrap.addBundle(new LoggingBundle());
    bootstrap.addBundle(new PrometheusBundle());
}
Also used : SubstitutingSourceProvider(io.dropwizard.configuration.SubstitutingSourceProvider) GuiceBundle(uk.gov.ida.hub.shared.guice.GuiceBundle) LoggingBundle(uk.gov.ida.bundles.LoggingBundle) ServiceStatusBundle(uk.gov.ida.bundles.ServiceStatusBundle) EnvironmentVariableSubstitutor(io.dropwizard.configuration.EnvironmentVariableSubstitutor) MonitoringBundle(uk.gov.ida.bundles.MonitoringBundle) EventEmitterModule(uk.gov.ida.eventemitter.EventEmitterModule) PrometheusBundle(uk.gov.ida.metrics.bundle.PrometheusBundle)

Aggregations

EnvironmentVariableSubstitutor (io.dropwizard.configuration.EnvironmentVariableSubstitutor)6 SubstitutingSourceProvider (io.dropwizard.configuration.SubstitutingSourceProvider)6 LoggingBundle (uk.gov.ida.bundles.LoggingBundle)6 MonitoringBundle (uk.gov.ida.bundles.MonitoringBundle)6 ServiceStatusBundle (uk.gov.ida.bundles.ServiceStatusBundle)6 GuiceBundle (uk.gov.ida.hub.shared.guice.GuiceBundle)6 PrometheusBundle (uk.gov.ida.metrics.bundle.PrometheusBundle)5 EventEmitterModule (uk.gov.ida.eventemitter.EventEmitterModule)3 PolicyConfiguration (uk.gov.ida.hub.policy.configuration.PolicyConfiguration)1 IdaJsonProcessingExceptionMapperBundle (uk.gov.ida.hub.policy.exception.IdaJsonProcessingExceptionMapperBundle)1