Java 类io.dropwizard.jdbi.bundles.DBIExceptionsBundle 实例源码

项目:pay-publicauth    文件:PublicAuthApp.java   
@Override
public void initialize(Bootstrap<PublicAuthConfiguration> bootstrap) {
    bootstrap.setConfigurationSourceProvider(
            new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(),
                    new EnvironmentVariableSubstitutor(false)
            )
    );

    bootstrap.addBundle(new DBIExceptionsBundle());

    bootstrap.addBundle(new MigrationsBundle<PublicAuthConfiguration>() {
        @Override
        public DataSourceFactory getDataSourceFactory(PublicAuthConfiguration configuration) {
            return configuration.getDataSourceFactory();
        }
    });

    bootstrap.addCommand(new DependentResourceWaitCommand());
}
项目:skid-road    文件:SkidRoadDropwizardExampleService.java   
@Override
public void initialize(Bootstrap<SkidRoadDropwizardExampleConfiguration> bootstrap) {

    ObjectMapper om = bootstrap.getObjectMapper();
    om.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
    om.registerModule(new JodaModule());
    om.setPropertyNamingStrategy(PropertyNamingStrategy.CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES);

    bootstrap.addBundle(new DBIExceptionsBundle());
    bootstrap.addBundle(new MigrationsBundle<SkidRoadDropwizardExampleConfiguration>() {
        @Override
        public DataSourceFactory getDataSourceFactory(SkidRoadDropwizardExampleConfiguration configuration) {
            return configuration.getSkidRoad().getDatabaseConfiguration();
        }
    });
    bootstrap.addCommand(new GenerateRandomKey());
}
项目:biblio-server    文件:BiblioApplication.java   
@Override
public void initialize(Bootstrap<BiblioConfiguration> bootstrap) {
    bootstrap.addBundle(new TemplateConfigBundle());
    bootstrap.addBundle(hibernate);
    bootstrap.addBundle(flyway);
    bootstrap.addBundle(new DBIExceptionsBundle());
    bootstrap.addBundle(new DBMigrationsBundle());
}
项目:service-feature    文件:FeatureJdbiApplication.java   
@Override
public void initializeService(final Bootstrap<FeatureJdbiConfiguration> bootstrap) {
    bootstrap.addBundle(new DBIExceptionsBundle());
    bootstrap.setConfigurationSourceProvider(
            new SubstitutingSourceProvider(
                    bootstrap.getConfigurationSourceProvider(),
                    new EnvironmentVariableSubstitutor()));
}
项目:ethmmyrss    文件:ThmmyRssApplication.java   
@Override
public void initialize(Bootstrap<ThmmyRssConfiguration> bootstrap) {
    bootstrap.addCommand(new RecreateTableCommand(this, "recreatetable", "Recreate the database table."));
    bootstrap.addCommand(new UpdateAnnouncementsCommand(this, "updatedb", "Update the announcement database"));
    bootstrap.addBundle(new DBIExceptionsBundle());
    bootstrap.addBundle(new AssetsBundle("/assets/", "/assets"));
    bootstrap.addBundle(new ViewBundle<>());
}
项目:service-hml    文件:HmlJdbiApplication.java   
@Override
public void initializeService(final Bootstrap<HmlJdbiConfiguration> bootstrap) {
    bootstrap.addBundle(new DBIExceptionsBundle());
}
项目:monasca-api    文件:MonApiApplication.java   
@Override
public void initialize(Bootstrap<ApiConfig> bootstrap) {
  /** Configure bundles */
  bootstrap.addBundle(new DBIExceptionsBundle());
}