当前位置: 首页>>代码示例>>Java>>正文


Java Java8Bundle类代码示例

本文整理汇总了Java中io.dropwizard.java8.Java8Bundle的典型用法代码示例。如果您正苦于以下问题:Java Java8Bundle类的具体用法?Java Java8Bundle怎么用?Java Java8Bundle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Java8Bundle类属于io.dropwizard.java8包,在下文中一共展示了Java8Bundle类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initialize

import io.dropwizard.java8.Java8Bundle; //导入依赖的package包/类
@Override
public void initialize(Bootstrap<ServerConfiguration> bootstrap) {
    bootstrap.addBundle(hibernateBundle);

    bootstrap.addBundle(new AssetsBundle("/swagger-spec", "/api-spec", null));

    bootstrap.addBundle(GuiceBundle.<ServerConfiguration>newBuilder()
        .addModule(new AbstractModule(){
            @Override protected void configure() {}
            @Provides SessionFactory sessionFactoryProvider() { return hibernateBundle.getSessionFactory();}
        })
        .setConfigClass(ServerConfiguration.class)
        .enableAutoConfig(getClass().getPackage().getName())
        .build(Stage.DEVELOPMENT)
    );

    bootstrap.addBundle(new Java8Bundle());

    // Enable variable substitution with environment variables
    bootstrap.setConfigurationSourceProvider(
        new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(),
            new EnvironmentVariableSubstitutor(false)
        )
    );
}
 
开发者ID:gov-ithub,项目名称:StopCozi-api,代码行数:26,代码来源:Server.java

示例2: initialize

import io.dropwizard.java8.Java8Bundle; //导入依赖的package包/类
@Override
public void initialize(final Bootstrap<AuthriteServiceConfiguration> bootstrap) {
    bootstrap.addBundle(new Java8Bundle());

    if (useClasspathAssets) {
        bootstrap.addBundle(new AssetsBundle("/assets/", "/"));
    } else {
        bootstrap.addBundle(new FileAssetsBundle("src/main/resources/assets", "/"));
    }

    bootstrap.addBundle(new MigrationsBundle<AuthriteServiceConfiguration>() {
        @Override
        public DataSourceFactory getDataSourceFactory(final AuthriteServiceConfiguration configuration) {
            return configuration.getDatabase();
        }
    });
}
 
开发者ID:lewisd32,项目名称:authrite,代码行数:18,代码来源:AuthriteServiceApplication.java

示例3: initialize

import io.dropwizard.java8.Java8Bundle; //导入依赖的package包/类
@Override
public void initialize(Bootstrap<TodoListConfiguration> bootstrap) {
    ebeanBundle = new EbeanBundle();
    //rabbitMqBundle = new RabbitMQBundle();

    // This outputs xDateTimes as ISO strings rather than an array of numbers in JSON.
    bootstrap.getObjectMapper().disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);

    bootstrap.addBundle(new Java8Bundle());
    bootstrap.addBundle(ebeanBundle);
    //bootstrap.addBundle(rabbitMqBundle);
    bootstrap.addBundle(new OAuth2Bundle(ebeanBundle));
    bootstrap.addBundle(new TodoClientBundle());
    bootstrap.addBundle(new MigrationsBundle<TodoListConfiguration>() {
        @Override
        public DataSourceFactory getDataSourceFactory(TodoListConfiguration configuration) {
            return configuration.getDatabaseConfig();
        }
    });

    // The anonymous subclass seems to be needed for the config type to be picked up correctly.
    bootstrap.addCommand(new WorkersCommand<TodoListConfiguration>(TodoListApplication.this) {});
    bootstrap.addCommand(new DbDiffCommand<TodoListConfiguration>() {});
}
 
开发者ID:Lugribossk,项目名称:dropwizard-experiment,代码行数:25,代码来源:TodoListApplication.java

示例4: initialize

import io.dropwizard.java8.Java8Bundle; //导入依赖的package包/类
@Override
public void initialize(Bootstrap<ServerConfiguration> bootstrap) {
  final boolean strict = false;
  bootstrap.setConfigurationSourceProvider(
      new SubstitutingSourceProvider(
          bootstrap.getConfigurationSourceProvider(),
          new EnvironmentVariableSubstitutor(strict)));
  bootstrap.addBundle(new Java8Bundle());
  bootstrap.addBundle(new Protobuf3Bundle());
  super.initialize(bootstrap);
}
 
开发者ID:dehora,项目名称:outland,代码行数:12,代码来源:ServerMain.java

示例5: initialize

import io.dropwizard.java8.Java8Bundle; //导入依赖的package包/类
@Override
public void initialize(Bootstrap<MutableSchedulerConfiguration> bootstrap) {
  super.initialize(bootstrap);

  StrSubstitutor strSubstitutor = new StrSubstitutor(new EnvironmentVariableLookup(false));
  strSubstitutor.setEnableSubstitutionInVariables(true);

  bootstrap.addBundle(new Java8Bundle());
  bootstrap.setConfigurationSourceProvider(
    new SubstitutingSourceProvider(
      bootstrap.getConfigurationSourceProvider(),
      strSubstitutor));
}
 
开发者ID:mesosphere,项目名称:dcos-cassandra-service,代码行数:14,代码来源:Main.java

示例6: initialize

import io.dropwizard.java8.Java8Bundle; //导入依赖的package包/类
@Override
public void initialize(Bootstrap<CassandraExecutorConfiguration> bootstrap) {
    super.initialize(bootstrap);

    bootstrap.addBundle(new Java8Bundle());
    bootstrap.setConfigurationSourceProvider(
            new SubstitutingSourceProvider(
                    bootstrap.getConfigurationSourceProvider(),
                    new StrSubstitutor(
                            new EnvironmentVariableLookup(false))));
}
 
开发者ID:mesosphere,项目名称:dcos-cassandra-service,代码行数:12,代码来源:Main.java

示例7: initialize

import io.dropwizard.java8.Java8Bundle; //导入依赖的package包/类
@Override public void initialize(Bootstrap<KeywhizConfig> bootstrap) {
  customizeObjectMapper(bootstrap.getObjectMapper());

  logger.debug("Registering commands");
  bootstrap.addCommand(new PreviewMigrateCommand());
  bootstrap.addCommand(new MigrateCommand());
  bootstrap.addCommand(new DbSeedCommand());
  bootstrap.addCommand(new GenerateAesKeyCommand());
  bootstrap.addCommand(new AddUserCommand());

  logger.debug("Registering bundles");
  bootstrap.addBundle(new Java8Bundle());
}
 
开发者ID:square,项目名称:keywhiz,代码行数:14,代码来源:KeywhizService.java

示例8: initialize

import io.dropwizard.java8.Java8Bundle; //导入依赖的package包/类
@Override
public void initialize(Bootstrap<DropwizardServerConfiguration> bootstrap) {
    guiceBundle = GuiceBundle.<DropwizardServerConfiguration>newBuilder()
            .addModule(new HelloModule())
            .addModule(new CarModule())
            .setConfigClass(DropwizardServerConfiguration.class)
            .build();
    bootstrap.addBundle(guiceBundle);
    bootstrap.addBundle(new Java8Bundle());

    ObjectMapper objectMapper = bootstrap.getObjectMapper();
    objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
}
 
开发者ID:cdelmas,项目名称:microservices-comparison,代码行数:14,代码来源:DropwizardApplication.java

示例9: initialize

import io.dropwizard.java8.Java8Bundle; //导入依赖的package包/类
@Override
public void initialize(Bootstrap<CivilizationConfiguration> bootstrap) {
    bootstrap.addBundle(new Java8Bundle());
    bootstrap.addBundle(new AssetsBundle());
}
 
开发者ID:cash1981,项目名称:civilization-boardgame-rest,代码行数:6,代码来源:CivilizationApplication.java

示例10: initialize

import io.dropwizard.java8.Java8Bundle; //导入依赖的package包/类
@Override
public void initialize(Bootstrap<CivilizationTestConfiguration> bootstrap) {
    bootstrap.addBundle(new Java8Bundle());
    bootstrap.addBundle(new AssetsBundle());
}
 
开发者ID:cash1981,项目名称:civilization-boardgame-rest,代码行数:6,代码来源:CivilizationIntegrationTestApplication.java


注:本文中的io.dropwizard.java8.Java8Bundle类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。