本文整理汇总了Java中io.dropwizard.jdbi.bundles.DBIExceptionsBundle类的典型用法代码示例。如果您正苦于以下问题:Java DBIExceptionsBundle类的具体用法?Java DBIExceptionsBundle怎么用?Java DBIExceptionsBundle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DBIExceptionsBundle类属于io.dropwizard.jdbi.bundles包,在下文中一共展示了DBIExceptionsBundle类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initialize
import io.dropwizard.jdbi.bundles.DBIExceptionsBundle; //导入依赖的package包/类
@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());
}
示例2: initialize
import io.dropwizard.jdbi.bundles.DBIExceptionsBundle; //导入依赖的package包/类
@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());
}
示例3: initialize
import io.dropwizard.jdbi.bundles.DBIExceptionsBundle; //导入依赖的package包/类
@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());
}
示例4: initializeService
import io.dropwizard.jdbi.bundles.DBIExceptionsBundle; //导入依赖的package包/类
@Override
public void initializeService(final Bootstrap<FeatureJdbiConfiguration> bootstrap) {
bootstrap.addBundle(new DBIExceptionsBundle());
bootstrap.setConfigurationSourceProvider(
new SubstitutingSourceProvider(
bootstrap.getConfigurationSourceProvider(),
new EnvironmentVariableSubstitutor()));
}
示例5: initialize
import io.dropwizard.jdbi.bundles.DBIExceptionsBundle; //导入依赖的package包/类
@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<>());
}
示例6: initializeService
import io.dropwizard.jdbi.bundles.DBIExceptionsBundle; //导入依赖的package包/类
@Override
public void initializeService(final Bootstrap<HmlJdbiConfiguration> bootstrap) {
bootstrap.addBundle(new DBIExceptionsBundle());
}
示例7: initialize
import io.dropwizard.jdbi.bundles.DBIExceptionsBundle; //导入依赖的package包/类
@Override
public void initialize(Bootstrap<ApiConfig> bootstrap) {
/** Configure bundles */
bootstrap.addBundle(new DBIExceptionsBundle());
}