Java 类io.dropwizard.configuration.UrlConfigurationSourceProvider 实例源码

项目: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");
}
项目:verify-hub    文件:SupportedMsaVersionsLoader.java   
@Inject
public SupportedMsaVersionsLoader(
        final ConfigurationFactoryFactory<SupportedMsaVersions> supportedMsaVersionsFactoryFactory,
        final ObjectMapper objectMapper,
        final UrlConfigurationSourceProvider configurationSourceProvider) {

    this.supportedMsaVersionsFactoryFactory = supportedMsaVersionsFactoryFactory;
    this.objectMapper = objectMapper;
    this.configurationSourceProvider = configurationSourceProvider;
}
项目:verify-hub    文件:SamlSoapProxyModule.java   
@Override
protected void configure() {
    bind(TrustStoreConfiguration.class).to(SamlSoapProxyConfiguration.class);
    bind(EventSinkProxy.class).to(EventSinkHttpProxy.class);
    bind(PublicKeyInputStreamFactory.class).toInstance(new PublicKeyFileInputStreamFactory());
    bind(InternalPublicKeyStore.class).to(HubMetadataPublicKeyStore.class);
    bind(RestfulClientConfiguration.class).to(SamlSoapProxyConfiguration.class);
    bind(Client.class).toProvider(DefaultClientProvider.class).asEagerSingleton();
    bind(new TypeLiteral<ConfigurationFactoryFactory<SupportedMsaVersions>>() {}).toInstance(new DefaultConfigurationFactoryFactory<SupportedMsaVersions>() {});
    bind(new TypeLiteral<SupportedMsaVersionsRepository>() {}).asEagerSingleton();
    bind(SupportedMsaVersionsBootstrap.class).asEagerSingleton();
    bind(SupportedMsaVersionsLoader.class).asEagerSingleton();
    bind(MetadataRefreshTask.class).asEagerSingleton();
    bind(ConfigServiceKeyStore.class).asEagerSingleton();
    bind(ExpiredCertificateMetadataFilter.class).toInstance(new ExpiredCertificateMetadataFilter());
    bind(UrlConfigurationSourceProvider.class).toInstance(new UrlConfigurationSourceProvider());
    bind(TrustStoreForCertificateProvider.class);
    bind(JsonResponseProcessor.class);
    bind(ObjectMapper.class).toInstance(new ObjectMapper());
    bind(X509CertificateFactory.class).toInstance(new X509CertificateFactory());
    bind(CertificateChainValidator.class);
    bind(CertificatesConfigProxy.class);
    bind(PKIXParametersProvider.class).toInstance(new PKIXParametersProvider());
    bind(KeyStoreCache.class);
    bind(KeyStoreLoader.class).toInstance(new KeyStoreLoader());
    bind(MatchingServiceHealthCheckHandler.class);
    bind(MatchingServiceHealthChecker.class);
    bind(MatchingServiceConfigProxy.class);
    bind(MatchingServiceHealthCheckClient.class);
    bind(HealthCheckEventLogger.class);
    bind(SamlEngineProxy.class);
    bind(HealthCheckSoapRequestClient.class);
    bind(AttributeQueryRequestRunnableFactory.class);
    bind(ExecuteAttributeQueryRequest.class);
    bind(AttributeQueryRequestClient.class);
    bind(ProtectiveMonitoringLogger.class).toInstance(new ProtectiveMonitoringLogger());
    bind(SoapRequestClient.class);
    bind(HubMatchingServiceResponseReceiverProxy.class);
    bind(ExternalCommunicationEventLogger.class);
    bind(SoapMessageManager.class).toInstance(new SoapMessageManager());
    bind(IpAddressResolver.class).toInstance(new IpAddressResolver());
    bind(TimeoutEvaluator.class).toInstance(new TimeoutEvaluator());
    bind(MetadataHealthCheckRegistry.class).asEagerSingleton();
}
项目:bouncestorage    文件:BounceApplication.java   
@Override
public void initialize(Bootstrap<BounceDropWizardConfiguration> bootstrap) {
    bootstrap.addBundle(new AssetsBundle("/assets", "/", "views/index.html"));
    bootstrap.setConfigurationSourceProvider(new UrlConfigurationSourceProvider());
}