Search in sources :

Example 1 with IdaJsonProcessingExceptionMapperBundle

use of uk.gov.ida.hub.policy.exception.IdaJsonProcessingExceptionMapperBundle in project verify-hub by alphagov.

the class PolicyApplication method initialize.

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

Aggregations

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