diff options
2 files changed, 7 insertions, 1 deletions
diff --git a/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java b/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java index 2698d9b..fe905f4 100644 --- a/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java +++ b/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java @@ -88,7 +88,7 @@ public class TcaAppProperties extends BaseConfigBindingServiceProperties { aai.setUrl(environment.getProperty(ConfigBindingServiceConstants.AAIURL)); aai.setUsername(environment.getProperty(ConfigBindingServiceConstants.AAIUSERNAME)); aai.setPassword(environment.getProperty(ConfigBindingServiceConstants.AAIPASSWORD)); - aai.setGenericVnfPath(ConfigBindingServiceConstants.AAIGENERICVNFPATH); + aai.setGenericVnfPath(environment.getProperty(ConfigBindingServiceConstants.AAIGENERICVNFPATH)); aai.setNodeQueryPath(environment.getProperty(ConfigBindingServiceConstants.AAINODEQUERYPATH)); tca.setAai(aai); diff --git a/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/config/TcaAaiConfig.java b/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/config/TcaAaiConfig.java index 773b9d3..4ec42d5 100644 --- a/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/config/TcaAaiConfig.java +++ b/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/config/TcaAaiConfig.java @@ -46,6 +46,9 @@ public class TcaAaiConfig { @Bean public RestTemplate aaiRestTemplate(final TcaAaiRestClientPreferences aaiRestClientPreferences, final RestTemplateBuilder restTemplateBuilder) { + if(aaiRestClientPreferences == null) { + return null; + } return restTemplateBuilder .additionalCustomizers(new HttpClientPreferencesCustomizer<>(aaiRestClientPreferences)) .build(); @@ -54,6 +57,9 @@ public class TcaAaiConfig { @Bean public TcaAaiEnrichmentService aaiEnrichmentService(final TcaAppProperties tcaAppProperties, final RestTemplate aaiRestTemplate) { + if (aaiRestTemplate == null) { + return null; + } return new TcaAaiEnrichmentServiceImpl(tcaAppProperties, aaiRestTemplate); } |