Search in sources :

Example 1 with DependentResourceWaitCommand

use of uk.gov.pay.connector.util.DependentResourceWaitCommand 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);
}
Also used : SubstitutingSourceProvider(io.dropwizard.configuration.SubstitutingSourceProvider) RenderStateTransitionGraphCommand(uk.gov.pay.connector.command.RenderStateTransitionGraphCommand) DataSourceFactory(io.dropwizard.db.DataSourceFactory) EnvironmentVariableSubstitutor(io.dropwizard.configuration.EnvironmentVariableSubstitutor) DependentResourceWaitCommand(uk.gov.pay.connector.util.DependentResourceWaitCommand)

Aggregations

EnvironmentVariableSubstitutor (io.dropwizard.configuration.EnvironmentVariableSubstitutor)1 SubstitutingSourceProvider (io.dropwizard.configuration.SubstitutingSourceProvider)1 DataSourceFactory (io.dropwizard.db.DataSourceFactory)1 RenderStateTransitionGraphCommand (uk.gov.pay.connector.command.RenderStateTransitionGraphCommand)1 DependentResourceWaitCommand (uk.gov.pay.connector.util.DependentResourceWaitCommand)1