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


Java Bootstrap.addCommand方法代码示例

本文整理汇总了Java中io.dropwizard.setup.Bootstrap.addCommand方法的典型用法代码示例。如果您正苦于以下问题:Java Bootstrap.addCommand方法的具体用法?Java Bootstrap.addCommand怎么用?Java Bootstrap.addCommand使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在io.dropwizard.setup.Bootstrap的用法示例。


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

示例1: initialize

import io.dropwizard.setup.Bootstrap; //导入方法依赖的package包/类
@Override
public void initialize(Bootstrap<AdminUsersConfig> bootstrap) {
    bootstrap.setConfigurationSourceProvider(
            new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(),
                    new EnvironmentVariableSubstitutor(NON_STRICT_VARIABLE_SUBSTITUTOR)
            )
    );

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

    bootstrap.addCommand(new DependentResourceWaitCommand());
    bootstrap.addCommand(new MigrateToInitialDbState());
}
 
开发者ID:alphagov,项目名称:pay-adminusers,代码行数:19,代码来源:AdminUsersApp.java

示例2: initialize

import io.dropwizard.setup.Bootstrap; //导入方法依赖的package包/类
@Override
public void initialize(Bootstrap<SamConfiguration> bootstrap) {

  bootstrap.setConfigurationSourceProvider(
    new SubstitutingSourceProvider(
      bootstrap.getConfigurationSourceProvider(),
      new EnvironmentVariableSubstitutor()
    )
  );

  bootstrap.addCommand(new TestCommand(this,
    Optional.empty(),
    //testDescription(AssetIntegrationTest.class, "newAssetMustHaveId"),
    SmokeTest.class,
    ServerIntegrationTest.class,
    GroupIntegrationTest.class,
    ApplicationIntegrationTest.class,
    AssetIntegrationTest.class,
    SearchIntegrationTest.class
  ));
}
 
开发者ID:atgse,项目名称:sam,代码行数:22,代码来源:Main.java

示例3: initialize

import io.dropwizard.setup.Bootstrap; //导入方法依赖的package包/类
@Override
public void initialize(Bootstrap<SamConfiguration> bootstrap) {

  final List<ViewRenderer> renderers = Arrays.asList(new MarkdownViewRenderer(), new HtmlViewRenderer(), new MustacheViewRenderer());
  bootstrap.addBundle(new ViewBundle<SamConfiguration>(renderers));
  bootstrap.addBundle(new AssetsBundle("/static", "/static", "index.mustache", "static"));
  bootstrap.addBundle(new AssetsBundle("/docs", "/docs", "index.html", "docs"));

  bootstrap.setConfigurationSourceProvider(
    new SubstitutingSourceProvider(
      bootstrap.getConfigurationSourceProvider(),
      new EnvironmentVariableSubstitutor()
    )
  );

  bootstrap.addCommand(new OAuth2Command());
  bootstrap.addCommand(new CreateDatabaseCommand(this));
  bootstrap.addCommand(new AddTestdataCommand(this));
}
 
开发者ID:atgse,项目名称:sam,代码行数:20,代码来源:Main.java

示例4: run

import io.dropwizard.setup.Bootstrap; //导入方法依赖的package包/类
@Override
public void run(final String... arguments) throws Exception {
    final Bootstrap<AppConfiguration> bootstrap = new Bootstrap<>(this);
    bootstrap.addCommand(command);
    initialize(bootstrap);

    ObjectMapper objectMapper = bootstrap.getObjectMapper();
    bootstrap.getObjectMapper()
            .setVisibilityChecker(objectMapper.getSerializationConfig().getDefaultVisibilityChecker()
            .withFieldVisibility(JsonAutoDetect.Visibility.ANY)
            .withGetterVisibility(JsonAutoDetect.Visibility.NONE)
            .withSetterVisibility(JsonAutoDetect.Visibility.NONE)
            .withCreatorVisibility(JsonAutoDetect.Visibility.NONE));

    final Cli cli = new Cli(new JarLocation(getClass()), bootstrap, System.out, System.err);
    if (!cli.run(arguments)) {
        System.exit(1);
    }
}
 
开发者ID:avoloshko,项目名称:WebCrawler,代码行数:20,代码来源:CliApp.java

示例5: initialize

import io.dropwizard.setup.Bootstrap; //导入方法依赖的package包/类
public void initialize(Bootstrap<ApplicationConfig> configurationBootstrap) {
    configurationBootstrap.addCommand(new NewCommand());
    configurationBootstrap.addCommand(new GenerateCommand());
    configurationBootstrap.addCommand(new UsersCommand());
    configurationBootstrap.addCommand(new ValidateCommand());
    configurationBootstrap.addCommand(new RunCommand());
}
 
开发者ID:adamkewley,项目名称:jobson,代码行数:8,代码来源:App.java

示例6: initialize

import io.dropwizard.setup.Bootstrap; //导入方法依赖的package包/类
@Override
public void initialize(Bootstrap<EmoConfiguration> bootstrap) {
    bootstrap.addCommand(new CreateKeyspacesCommand());
    bootstrap.addCommand(new RegisterCassandraCommand());
    bootstrap.addCommand(new ListCassandraCommand());
    bootstrap.addCommand(new UnregisterCassandraCommand());
    bootstrap.addCommand(new PurgeDatabusEventsCommand());
    bootstrap.addCommand(new AllTablesReportCommand());
    bootstrap.addCommand(new EncryptConfigurationApiKeyCommand());
    // Write Date objects using ISO8601 strings instead of numeric milliseconds-since-1970.
    bootstrap.getObjectMapper().setDateFormat(new ISO8601DateFormat());
    bootstrap.getObjectMapper().registerModule(new LazyJsonModule());

    bootstrap.getMetricRegistry().register("jvm.gc.totals", new EmoGarbageCollectorMetricSet());
}
 
开发者ID:bazaarvoice,项目名称:emodb,代码行数:16,代码来源:EmoService.java

示例7: initialize

import io.dropwizard.setup.Bootstrap; //导入方法依赖的package包/类
@Override
public void initialize(Bootstrap<KeystoreConfiguration> bootstrap) {
    // Enable variable substitution with environment variables
    bootstrap.setConfigurationSourceProvider(
            new SubstitutingSourceProvider(
                    bootstrap.getConfigurationSourceProvider(),
                    new EnvironmentVariableSubstitutor(false)
            )
    );

    bootstrap.addCommand(new TLSTruststoreTestCommand<>(this));
}
 
开发者ID:mesosphere,项目名称:dcos-commons,代码行数:13,代码来源:KeystoreApplication.java

示例8: initialize

import io.dropwizard.setup.Bootstrap; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public final void initialize(Bootstrap<?> bootstrap) {
   final Class<T> klass = (Class<T>) bootstrap.getApplication().getConfigurationClass();
   bootstrap.addCommand(new DbCommand<>(name(), this, klass, getMigrationsFileName()));
}
 
开发者ID:acciente,项目名称:oacc-example-securetodo,代码行数:7,代码来源:SecureTodoApplication.java

示例9: initialize

import io.dropwizard.setup.Bootstrap; //导入方法依赖的package包/类
@Override
public void initialize(Bootstrap<KTSDConfiguration> bootstrap) {
  super.initialize(bootstrap);
  bootstrap.addCommand(new PutBench(this));
}
 
开发者ID:danburkert,项目名称:kudu-ts,代码行数:6,代码来源:KTSDApplication.java


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