X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=enrichment-coordinator-service%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fenrichment%2Fconfiguration%2FApplicationConfig.java;h=fce9e2241f98eded8c26f20d6f08a64f18816746;hb=1da5c887797ae8cb715ad0b16b388aae18cda948;hp=89374649954709887f8a714842315390f8beff14;hpb=d1702a33a3527cf46527c7cd61f435bd7ed08522;p=nonrtric.git diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/configuration/ApplicationConfig.java b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/configuration/ApplicationConfig.java index 89374649..fce9e224 100644 --- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/configuration/ApplicationConfig.java +++ b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/configuration/ApplicationConfig.java @@ -20,10 +20,9 @@ package org.oransc.enrichment.configuration; -import javax.validation.constraints.NotEmpty; - import lombok.Getter; +import org.oransc.enrichment.configuration.WebClientConfig.HttpProxyConfig; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; @@ -31,10 +30,6 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties @EnableConfigurationProperties @ConfigurationProperties() public class ApplicationConfig { - @NotEmpty - @Getter - @Value("${app.filepath}") - private String localConfigurationFilePath; @Getter @Value("${app.vardata-directory}") @@ -61,7 +56,17 @@ public class ApplicationConfig { @Value("${app.webclient.trust-store}") private String sslTrustStore = ""; + @Value("${app.webclient.http.proxy-host:\"\"}") + private String httpProxyHost = ""; + + @Value("${app.webclient.http.proxy-port:0}") + private int httpProxyPort = 0; + public WebClientConfig getWebClientConfig() { + HttpProxyConfig httpProxyConfig = ImmutableHttpProxyConfig.builder() // + .httpProxyHost(this.httpProxyHost) // + .httpProxyPort(this.httpProxyPort) // + .build(); return ImmutableWebClientConfig.builder() // .keyStoreType(this.sslKeyStoreType) // .keyStorePassword(this.sslKeyStorePassword) // @@ -70,6 +75,7 @@ public class ApplicationConfig { .isTrustStoreUsed(this.sslTrustStoreUsed) // .trustStore(this.sslTrustStore) // .trustStorePassword(this.sslTrustStorePassword) // + .httpProxyConfig(httpProxyConfig) // .build(); }