Java 类io.dropwizard.assets.AssetsBundle 实例源码

项目:SECP    文件:SECPService.java   
@Override
public void initialize(Bootstrap<SECPConfiguration> bootstrap) {
    bootstrap.addBundle(new AssetsBundle("/assets/app/", "/", "index.html"));
    bootstrap.addBundle(new AssetsBundle("/assets/app", "/login", "index.html", "login"));
    bootstrap.addBundle(new AssetsBundle("/assets/app", "/login/authenticate", "index.html", "authenticate"));
    bootstrap.addBundle(new AssetsBundle("/assets/app", "/login/forgot-password", "index.html", "forgot-password"));
    bootstrap.addBundle(new AssetsBundle("/assets/app", "/chats", "index.html", "chats"));
    bootstrap.addBundle(new AssetsBundle("/assets/app", "/portal", "index.html", "portal"));
    bootstrap.addBundle(new AssetsBundle("/assets/app", "/portal/user-profile", "index.html", "user-profile"));
    bootstrap.addBundle(new AssetsBundle("/assets/app", "/portal/user-profile/change-password", "index.html", "change-password"));
    bootstrap.addBundle(new AssetsBundle("/assets/app", "/portal/group-profile", "index.html", "group-profile"));
    bootstrap.addBundle(new AssetsBundle("/assets/app", "/portal/audit", "index.html", "audit"));
    bootstrap.addBundle(new AssetsBundle("/assets/app", "/portal/audit/user", "index.html", "audit-user"));
    bootstrap.addBundle(new AssetsBundle("/assets/app", "/portal/audit/group", "index.html", "audit-group"));
    bootstrap.addBundle(new AssetsBundle("/assets/app", "/portal/manage", "index.html", "manage"));
    bootstrap.addBundle(new AssetsBundle("/assets/app", "/portal/manage/user", "index.html", "manage-user"));
    bootstrap.addBundle(new AssetsBundle("/assets/app", "/portal/manage/group", "index.html", "manage-group"));
    bootstrap.addBundle(new AssetsBundle("/assets/app", "/portal/configure", "index.html", "configure"));
    bootstrap.addBundle(new AssetsBundle("/assets/app", "/portal/configure/filter", "index.html", "tags"));
    bootstrap.addBundle(new AssetsBundle("/assets/app", "/portal/configure/tags", "index.html", "filter"));
    bootstrap.addBundle(new AssetsBundle("/assets/app", "/error/404", "index.html", "404"));

    bootstrap.addBundle(hibernateBundle);
    ObjectMapper mapper = bootstrap.getObjectMapper();
    mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
}
项目:StopCozi-api    文件:Server.java   
@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)
        )
    );
}
项目:openregister-java    文件:RegisterApplication.java   
@Override
public void initialize(Bootstrap<RegisterConfiguration> bootstrap) {
    bootstrap.addBundle(new ViewBundle<>(ImmutableList.of(new ThymeleafViewRenderer("HTML5", "/templates/", ".html", false))));

    if (isRunningOnCloudFoundry()) {
        bootstrap.setConfigurationSourceProvider(new UrlConfigurationSourceProvider());
    }

    bootstrap.setConfigurationSourceProvider(
            new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(),
                    new EnvironmentVariableSubstitutor(false)
            ));
    bootstrap.addBundle(new AssetsBundle("/assets"));
    bootstrap.addBundle(new CorsBundle());
    bootstrap.addBundle(new LogstashBundle());

    System.setProperty("java.protocol.handler.pkgs", "uk.gov.register.protocols");
}
项目:sam    文件:Main.java   
@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));
}
项目:WebCrawler    文件:WebApp.java   
@Override
public void initialize(Bootstrap<AppConfiguration> bootstrap) {
    bootstrap.setConfigurationSourceProvider(
            new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(),
                    new EnvironmentVariableSubstitutor()
            )
    );

    /* Configure objectMapper to instantiate immutable configuration correctly */
    ObjectMapper objectMapper = bootstrap.getObjectMapper();
    objectMapper.registerModule(new JSR310Module());
    bootstrap.getObjectMapper()
            .setVisibilityChecker(objectMapper.getSerializationConfig().getDefaultVisibilityChecker()
                    .withFieldVisibility(JsonAutoDetect.Visibility.ANY)
                    .withGetterVisibility(JsonAutoDetect.Visibility.NONE)
                    .withSetterVisibility(JsonAutoDetect.Visibility.NONE)
                    .withCreatorVisibility(JsonAutoDetect.Visibility.NONE));

    /* Host static resources */
    bootstrap.addBundle((new AssetsBundle("/assets", "/", "index.html", "static")));

    /* Enable WebSockets support */
    bootstrap.addBundle(websocketBundle = new WebsocketBundle<>());
}
项目:authrite    文件:AuthriteServiceApplication.java   
@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();
        }
    });
}
项目:keycloak-dropwizard-integration    文件:LotteryApplication.java   
@Override
public void initialize(Bootstrap<LotteryConfiguration> bootstrap) {

    // set up folders for static content
    bootstrap.addBundle(new AssetsBundle("/assets/ajax", "/ajax", null, "ajax"));

    // tag::keycloak[]
    bootstrap.addBundle(new KeycloakBundle<LotteryConfiguration>() {
        @Override
        protected KeycloakConfiguration getKeycloakConfiguration(LotteryConfiguration configuration) {
            return configuration.getKeycloakConfiguration();
        }
        /* OPTIONAL: override getUserClass(), createAuthorizer() and createAuthenticator() if you want to use
        * a class other than de.ahus1.keycloak.dropwizard.User to be injected by @User*/
    });
    // end::keycloak[]
}
项目:keycloak-dropwizard-integration    文件:LotteryApplication.java   
@Override
public void initialize(Bootstrap<LotteryConfiguration> bootstrap) {

    // set up folders for static content
    bootstrap.addBundle(new AssetsBundle("/assets/css", "/css", null, "css"));
    bootstrap.addBundle(new AssetsBundle("/assets/js", "/js", null, "js"));
    bootstrap.addBundle(new AssetsBundle("/assets/fonts", "/fonts", null, "fonts"));
    bootstrap.addBundle(new AssetsBundle("/assets/html", "/html", null, "html"));

    // setup Freemarker views.
    bootstrap.addBundle(new ViewBundle());

    // tag::keycloak[]
    bootstrap.addBundle(new KeycloakBundle<LotteryConfiguration>() {
        @Override
        protected KeycloakConfiguration getKeycloakConfiguration(LotteryConfiguration configuration) {
            return configuration.getKeycloakConfiguration();
        }
        /* OPTIONAL: override getUserClass(), createAuthorizer() and createAuthenticator() if you want to use
        * a class other than de.ahus1.keycloak.dropwizard.User to be injected by @User*/
    });
    // end::keycloak[]

}
项目:dropwizard-views-thymeleaf    文件:ExampleBootstrapAppication.java   
@Override
public void initialize(Bootstrap<ExampleBootstrapConfigration> bootstrap) {
      //
      bootstrap.addBundle(new AssetsBundle("/templates/css","/css",null,"css"));
      bootstrap.addBundle(new AssetsBundle("/templates/js","/js",null,"js"));
      bootstrap.addBundle(new AssetsBundle("/templates/fonts","/fonts",null,"fonts"));

    ImmutableSet<ViewRenderer> renderes= ImmutableSet.of((ViewRenderer)new ThymeleafViewRenderer());
    bootstrap.addBundle(new ViewBundle(renderes));

 }
项目:dropwizard-mongo-cms    文件:CMSApplication.java   
@Override
    public void initialize(Bootstrap<CMSConfiguration> bootstrap) {
        bootstrap.addBundle(new ViewBundle());
        bootstrap.addBundle(new AssetsBundle());
//        bootstrap.addBundle(new AssetsBundle("/assets/css", "/css", null, "css"));
//        bootstrap.addBundle(new AssetsBundle("/assets/js", "/js", null, "js"));
//        bootstrap.addBundle(new AssetsBundle("/assets/fonts", "/fonts", null, "fonts"));
//        bootstrap.addBundle(new AssetsBundle("/assets/img", "/img", null, "img"));
    }
项目:BioSolr    文件:OntologyApplication.java   
@Override
public void initialize(Bootstrap<OntologyConfiguration> bootstrap) {
    // Add bundle for static asset directories
    bootstrap.addBundle(new AssetsBundle("/static", "/", "index.html", "static"));
    // Add webjars AssetsBundle, to include bootstrap, etc.
    bootstrap.addBundle(new AssetsBundle("/META-INF/resources/webjars", "/webjars", null, "webjars"));
}
项目:BioSolr    文件:OntologyApplication.java   
@Override
public void initialize(Bootstrap<OntologyConfiguration> bootstrap) {
    // Add bundle for static asset directories
    bootstrap.addBundle(new AssetsBundle("/static", "/", "index.html", "static"));
    // Add webjars AssetsBundle, to include bootstrap, etc.
    bootstrap.addBundle(new AssetsBundle("/META-INF/resources/webjars", "/webjars", null, "webjars"));
}
项目:dropwizard-backbone-app    文件:AppService.java   
@Override
public void initialize(Bootstrap<AppConfiguration> bootstrap) {

  ImmutableList<Class<?>> classes = scanForEntities();
  hibernate = new HibernateBundle<AppConfiguration>(classes, new SessionFactoryFactory()) {
@Override
public DataSourceFactory getDataSourceFactory(AppConfiguration configuration) {
    return configuration.getDatabase();
}
  };

  bootstrap.addBundle(hibernate);

  db = new DB();
  bootstrap.addBundle(new AssetsBundle("/assets/", "/", "index.htm"));

  devModule = new AppDevModule(db);
  bootstrap.addBundle(GuiceBundle.newBuilder()
                                 .addModule(devModule)
                                 .enableAutoConfig(getClass().getPackage().getName())
                                 .build());
}
项目:Baragon    文件:BaragonService.java   
@Override
public void initialize(Bootstrap<BaragonConfiguration> bootstrap) {
  if (!Strings.isNullOrEmpty(System.getProperty(BARAGON_DEFAULT_CONFIG_LOCATION))) {
    bootstrap.setConfigurationSourceProvider(
        new MergingConfigProvider(
            bootstrap.getConfigurationSourceProvider(),
            System.getProperty(BARAGON_DEFAULT_CONFIG_LOCATION),
            bootstrap.getObjectMapper(),
            new YAMLFactory()));
  }

  GuiceBundle<BaragonConfiguration> guiceBundle = GuiceBundle.defaultBuilder(BaragonConfiguration.class)
      .modules(new BaragonServiceModule())
      .modules(new MetricsInstrumentationModule(bootstrap.getMetricRegistry()))
      .modules(new BaragonResourcesModule())
      .build();

  bootstrap.addBundle(new CorsBundle());
  bootstrap.addBundle(new BaragonAuthBundle());
  bootstrap.addBundle(guiceBundle);
  bootstrap.addBundle(new ViewBundle<>());
  bootstrap.addBundle(new AssetsBundle("/assets/static/", "/static/"));
}
项目:timbuctoo    文件:TimbuctooV4.java   
@Override
public void initialize(Bootstrap<TimbuctooConfiguration> bootstrap) {
  //bundles
  activeMqBundle = new ActiveMQBundle();
  bootstrap.addBundle(activeMqBundle);
  bootstrap.addBundle(new MultiPartBundle());
  bootstrap.addBundle(new AssetsBundle("/static", "/static", "index.html"));
  /*
   * Make it possible to use environment variables in the config.
   * see: http://www.dropwizard.io/0.9.1/docs/manual/core.html#environment-variables
   */
  bootstrap.setConfigurationSourceProvider(
    new SubstitutingSourceProvider(
      bootstrap.getConfigurationSourceProvider(),
      new EnvironmentVariableSubstitutor(true)
    ));
}
项目:SAPNetworkMonitor    文件:NiPingMonitorApplication.java   
@Override
public void initialize(Bootstrap<ServerConfiguration> bootstrap) {

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

    bootstrap.addBundle(new AssetsBundle("/com/cloudwise/sap/niping/view/static", "/static", null, "static"));
    bootstrap.addBundle(new AssetsBundle("/com/cloudwise/sap/niping/view/vendor", "/vendor", null, "vendor"));
    bootstrap.addBundle(new ViewBundle<ServerConfiguration>());
}
项目:rufus    文件:RufusApplication.java   
@Override
public void initialize(Bootstrap<RufusConfiguration> bootstrap) {
    bootstrap.addBundle(new AssetsBundle("/app", "/", "index.html"));
    bootstrap.addBundle(new ViewBundle<>());
    bootstrap.addBundle(new MultiPartBundle());
    bootstrap.addBundle(new MigrationsBundle<RufusConfiguration>() {
        @Override
        public DataSourceFactory getDataSourceFactory(RufusConfiguration conf) {
            return conf.getDataSourceFactory();
        }
    });
}
项目:incubator-freemarker-online-tester    文件:FreeMarkerOnlineTester.java   
@Override
public void initialize(Bootstrap<FreeMarkerOnlineTesterConfiguration> bootstrap) {
    bootstrap.addBundle(new ViewBundle<FreeMarkerOnlineTesterConfiguration>() {
        @Override
        public Map<String, Map<String, String>> getViewConfiguration(FreeMarkerOnlineTesterConfiguration config) {
            return config.getViewRendererConfiguration();
        }           
    });
    bootstrap.addBundle(new AssetsBundle());
    bootstrap.addBundle(new RedirectBundle(
            new UriRedirect(
                    "http://freemarker-online.kenshoo.com([:/].*)$",
                    "http://try.freemarker.org$1")
    ));
}
项目:referenceapp    文件:AdminUIApplication.java   
@Override
  public void initialize(Bootstrap<AdminUIConfiguration> bootstrap) {
bootstrap.setConfigurationSourceProvider(new ResourceConfigurationSourceProvider());
bootstrap.addBundle(new AssetsBundle("/assets", "/pages"));
bootstrap.addBundle(new AssetsBundle("/assets/css", "/css", null, "css"));
bootstrap.addBundle(new AssetsBundle("/assets/js", "/js", null, "js"));
bootstrap.addBundle(new AssetsBundle("/assets/json", "/json", null, "json"));

// We shouldn't have to do this: Zuul forwarding doesn't like the first
// json exposure for some reason
bootstrap.addBundle(new AssetsBundle("/assets/json", "/pages/json", null, "json2"));

  }
项目:Mastering-Mesos    文件:SingularityService.java   
@Override
public void initialize(final Bootstrap<T> bootstrap) {
  if (!Strings.isNullOrEmpty(System.getProperty(SINGULARITY_DEFAULT_CONFIGURATION_PROPERTY))) {
    bootstrap.setConfigurationSourceProvider(new MergingSourceProvider(bootstrap.getConfigurationSourceProvider(), System.getProperty(SINGULARITY_DEFAULT_CONFIGURATION_PROPERTY), bootstrap.getObjectMapper(), new YAMLFactory()));
  }

  final Iterable<? extends Module> additionalModules = checkNotNull(getGuiceModules(bootstrap), "getGuiceModules() returned null");
  final Iterable<? extends Bundle> additionalBundles = checkNotNull(getDropwizardBundles(bootstrap), "getDropwizardBundles() returned null");
  final Iterable<? extends ConfiguredBundle<T>> additionalConfiguredBundles = checkNotNull(getDropwizardConfiguredBundles(bootstrap), "getDropwizardConfiguredBundles() returned null");

  final GuiceBundle<SingularityConfiguration> guiceBundle = GuiceBundle.defaultBuilder(SingularityConfiguration.class)
      .modules(new SingularityServiceModule())
      .modules(additionalModules)
      .build();
  bootstrap.addBundle(guiceBundle);

  bootstrap.addBundle(new CorsBundle());
  bootstrap.addBundle(new ViewBundle());
  bootstrap.addBundle(new AssetsBundle("/assets/static/", "/static/"));
  bootstrap.addBundle(new AssetsBundle("/assets/api-docs/", "/api-docs/", "index.html", "api-docs"));
  bootstrap.addBundle(new MigrationsBundle<SingularityConfiguration>() {
    @Override
    public DataSourceFactory getDataSourceFactory(final SingularityConfiguration configuration) {
      return configuration.getDatabaseConfiguration().get();
    }
  });

  for (Bundle bundle : additionalBundles) {
    bootstrap.addBundle(bundle);
  }

  for (ConfiguredBundle<T> configuredBundle : additionalConfiguredBundles) {
    bootstrap.addBundle(configuredBundle);
  }

  bootstrap.getObjectMapper().registerModule(new ProtobufModule());
  bootstrap.getObjectMapper().registerModule(new GuavaModule());
  bootstrap.getObjectMapper().setSerializationInclusion(Include.NON_NULL);
  bootstrap.getObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
}
项目:KeyStor    文件:EncryptionServiceApplication.java   
/**
 *
 * @param bootstrap The pre-start application environment, containing everything required to bootstrap a Dropwizard command.
 *                  It wires up everything being used in the Environment, including the Configuration and the Application
 */
@Override
public void initialize(Bootstrap<EncryptionServiceConfiguration> bootstrap) {
    // Enable variable substitution with environment variables
    bootstrap.setConfigurationSourceProvider(
            new SubstitutingSourceProvider(
                    bootstrap.getConfigurationSourceProvider(),
                    new EnvironmentVariableSubstitutor(false)
            )
    );

    bootstrap.addBundle(new AssetsBundle());
}
项目:KeyStor    文件:ConnectionServiceApplication.java   
/**
 *
 * @param bootstrap The pre-start application environment, containing everything required to bootstrap a Dropwizard command.
 *                  It wires up everything being used in the Environment, including the Configuration and the Application
 */
@Override
public void initialize(Bootstrap<ConnectionServiceConfiguration> bootstrap) {
    // Enable variable substitution with environment variables
    bootstrap.setConfigurationSourceProvider(
            new SubstitutingSourceProvider(
                    bootstrap.getConfigurationSourceProvider(),
                    new EnvironmentVariableSubstitutor(false)
            )
    );

    bootstrap.addBundle(new AssetsBundle());
}
项目:registry    文件:RegistryApplication.java   
@Override
public void initialize(Bootstrap<RegistryConfiguration> bootstrap) {
    // always deploy UI on /ui. If there is no other filter like Confluent etc, redirect / to /ui
    bootstrap.addBundle(new AssetsBundle("/assets", "/ui", "index.html", "static"));
    bootstrap.addBundle(new SwaggerBundle<RegistryConfiguration>() {
        @Override
        protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(RegistryConfiguration registryConfiguration) {
            return registryConfiguration.getSwaggerBundleConfiguration();
        }
    });
    super.initialize(bootstrap);
}
项目:kafka-rest    文件:DemoApplication.java   
@Override
public void initialize(Bootstrap<DemoConfiguration> bootstrap) {
  bootstrap.addBundle(new AssetsBundle("/assets/index.html", "/"));
  bootstrap.setConfigurationSourceProvider(
          new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(),
                  new EnvironmentVariableSubstitutor()
          )
  );
}
项目:heroku-gradle-dropwizard    文件:WebApplication.java   
@Override
public void initialize(Bootstrap<AppConfiguration> bootstrap) {
    bootstrap.addBundle(new AssetsBundle("/ui", "/", "index.html"));
    bootstrap.addBundle(hibernate);
    bootstrap.addBundle(new MigrationsBundle<AppConfiguration>() {

        @Override
        public PooledDataSourceFactory getDataSourceFactory(AppConfiguration configuration) {
            return configuration.getDataSourceFactory();
        }
    });
}
项目:heroku-kafka-demo-java    文件:DemoApplication.java   
@Override
public void initialize(Bootstrap<DemoConfiguration> bootstrap) {
  bootstrap.addBundle(new AssetsBundle("/assets/index.html", "/"));
  bootstrap.setConfigurationSourceProvider(
          new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(),
                  new EnvironmentVariableSubstitutor()
          )
  );
}
项目:irontest    文件:IronTestApplication.java   
@Override
public void initialize(Bootstrap<IronTestConfiguration> bootstrap) {
    bootstrap.addBundle(new AssetsBundle("/assets/app", "/ui", "index.htm", "ui"));
    bootstrap.addBundle(new AssetsBundle("/META-INF/resources/webjars", "/ui/lib", null, "uilib"));
    bootstrap.addBundle(jaxWsBundle);
    bootstrap.addBundle(new MultiPartBundle());
    bootstrap.addBundle(new ViewBundle<IronTestConfiguration>(){
        @Override
        public Map<String, Map<String, String>> getViewConfiguration(IronTestConfiguration config) {
            return config.getViewRendererConfiguration();
        }
    });
    Configuration.setDefaults(new Configuration.Defaults() {
        private final JsonProvider jsonProvider = new JacksonJsonProvider();
        private final MappingProvider mappingProvider = new JacksonMappingProvider();

        @Override
        public JsonProvider jsonProvider() {
            return jsonProvider;
        }

        @Override
        public MappingProvider mappingProvider() {
            return mappingProvider;
        }

        @Override
        public Set<Option> options() {
            return EnumSet.noneOf(Option.class);
        }
    });
}
项目:cassandra-reaper    文件:ReaperApplication.java   
/**
 * Before a Dropwizard application can provide the command-line interface, parse a configuration file, or run as a
 * server, it must first go through a bootstrapping phase. You can add Bundles, Commands, or register Jackson modules
 * to allow you to include custom types as part of your configuration class.
 */
@Override
public void initialize(Bootstrap<ReaperApplicationConfiguration> bootstrap) {
  bootstrap.addBundle(new AssetsBundle("/assets/", "/webui", "index.html"));
  bootstrap.getObjectMapper().registerModule(new JavaTimeModule());

  // enable using environment variables in yml files
  final SubstitutingSourceProvider envSourceProvider = new SubstitutingSourceProvider(
      bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false));
  bootstrap.setConfigurationSourceProvider(envSourceProvider);
}
项目:stonesgame.io    文件:GameApplication.java   
@Override
public void initialize(final Bootstrap<GameConfiguration> bootstrap) {
    // allow for ease of configuration via environment variables
    // according to The Twelve-Factor App [http://12factor.net/], and deployment on Heroku
    bootstrap.setConfigurationSourceProvider(
            new SubstitutingSourceProvider(
                    bootstrap.getConfigurationSourceProvider(),
                    new EnvironmentVariableSubstitutor(false))); // not strict, allows undefined env vars
    // serve static files from root "/" and configure index page
    bootstrap.addBundle(new AssetsBundle("/assets", "/", "index.html", "assets"));
}
项目:Pinot    文件:ThirdEyeApplication.java   
@Override
public void initialize(Bootstrap<Config> bootstrap)
{
  bootstrap.addBundle(new ViewBundle());
  bootstrap.addBundle(new AssetsBundle("/assets/stylesheets", "/assets/stylesheets", null, "stylesheets"));
  bootstrap.addBundle(new AssetsBundle("/assets/javascripts", "/assets/javascripts", null, "javascripts"));
  bootstrap.addBundle(new AssetsBundle("/assets/images", "/assets/images", null, "images"));
}
项目:Pinot    文件:ThirdEyeReportingApplication.java   
@Override
public void initialize(final Bootstrap<ThirdEyeReportingConfiguration> bootstrap) {
    bootstrap.addBundle(new ViewBundle());
    bootstrap.addBundle(new AssetsBundle("/assets/css", "/assets/css", null, "css"));
    bootstrap.addBundle(new AssetsBundle("/assets/js", "/assets/js", null, "js"));
    bootstrap.addBundle(new AssetsBundle("/assets/img", "/assets/img", null, "img"));
}
项目:Pinot    文件:ThirdEyeDetectorApplication.java   
@Override
public void initialize(final Bootstrap<ThirdEyeDetectorConfiguration> bootstrap) {
  bootstrap.addBundle(new MigrationsBundle<ThirdEyeDetectorConfiguration>() {
    @Override
    public DataSourceFactory getDataSourceFactory(ThirdEyeDetectorConfiguration config) {
      return config.getDatabase();
    }
  });

  bootstrap.addBundle(hibernate);

  bootstrap.addBundle(new AssetsBundle("/assets/", "/", "index.html"));
}
项目:Pinot    文件:ThirdEyeDashboard.java   
@Override
public void initialize(Bootstrap<ThirdEyeDashboardConfiguration> bootstrap) {
  bootstrap.addBundle(new ViewBundle());
  bootstrap.addBundle(new AssetsBundle("/assets/css", "/assets/css", null, "css"));
  bootstrap.addBundle(new AssetsBundle("/assets/js", "/assets/js", null, "js"));
  bootstrap.addBundle(new AssetsBundle("/assets/img", "/assets/img", null, "img"));
}
项目:karamel    文件:KaramelServiceApplication.java   
@Override
  public void initialize(Bootstrap<KaramelServiceConfiguration> bootstrap) {

    logger.debug("Executing any initialization tasks.");
//        bootstrap.addBundle(new ConfiguredAssetsBundle("/assets/", "/dashboard/"));
    // https://groups.google.com/forum/#!topic/dropwizard-user/UaVcAYm0VlQ
    bootstrap.addBundle(new AssetsBundle("/assets/", "/"));
  }
项目:keycloak-dropwizard-integration    文件:LotteryApplication.java   
@Override
public void initialize(Bootstrap<LotteryConfiguration> bootstrap) {

    // set up folders for static content
    bootstrap.addBundle(new AssetsBundle("/assets/css", "/css", null, "css"));
    bootstrap.addBundle(new AssetsBundle("/assets/js", "/js", null, "js"));
    bootstrap.addBundle(new AssetsBundle("/assets/fonts", "/fonts", null, "fonts"));
    bootstrap.addBundle(new AssetsBundle("/assets/html", "/html", null, "html"));

    // setup Freemarker views.
    bootstrap.addBundle(new ViewBundle());

}
项目:dropwizard-angular-bootstrap    文件:DropAngularApp.java   
@Override
public void initialize(Bootstrap<DropAngularConfiguration> bootstrap) {
    bootstrap.addBundle(migrationBundle);
       bootstrap.addBundle(hibernateBundle);        
       // with this, we're adding the webapp folder (located in our resources)
       // as root of our webapp.
       bootstrap.addBundle(new AssetsBundle("/webapp", "/", "index.html"));
}
项目:SciGraph    文件:MainApplication.java   
@Override
public void initialize(Bootstrap<ApplicationConfiguration> bootstrap) {
  bootstrap.addBundle(new AssetsBundle("/swagger/", "/docs", "index.html"));
  bootstrap.addBundle(new ViewBundle<ApplicationConfiguration>() {
    @Override
    public Map<String, Map<String, String>> getViewConfiguration(
        ApplicationConfiguration configuration) {
      return new HashMap<>();
    }
  });
  bootstrap.addBundle(GuiceBundle.builder()
      .enableAutoConfig("io.scigraph.services")
      .injectorFactory(factory).modules(new SciGraphApplicationModule()).build());
}
项目:myriad    文件:Main.java   
@Override
public void initialize(Bootstrap<MyriadConfiguration> bootstrap) {
    bootstrap.addBundle(new ViewBundle());
    bootstrap
            .addBundle(new AssetsBundle("/assets/css", "/css", null, "css"));
    bootstrap.addBundle(new AssetsBundle("/assets/js", "/js", null, "js"));
}
项目:pinot    文件:ThirdEyeDashboardApplication.java   
@SuppressWarnings("unchecked")
@Override
public void initialize(Bootstrap<ThirdEyeDashboardConfiguration> bootstrap) {
  bootstrap.addBundle(new ViewBundle());
  bootstrap.addBundle(new HelperBundle());
  bootstrap.addBundle(new RedirectBundle(new PathRedirect("/", "/thirdeye")));
  bootstrap.addBundle(new AssetsBundle("/app/", "/app", "index.html", "app"));
  bootstrap.addBundle(new AssetsBundle("/assets", "/assets", null, "assets"));
  bootstrap.addBundle(new AssetsBundle("/assets/css", "/assets/css", null, "css"));
  bootstrap.addBundle(new AssetsBundle("/assets/js", "/assets/js", null, "js"));
  bootstrap.addBundle(new AssetsBundle("/assets/lib", "/assets/lib", null, "lib"));
  bootstrap.addBundle(new AssetsBundle("/assets/img", "/assets/img", null, "img"));
  bootstrap.addBundle(new AssetsBundle("/assets/data", "/assets/data", null, "data"));
}