summaryrefslogtreecommitdiffstats
path: root/aai-rest/src
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-02-26 14:03:09 +0100
committerFiete Ostkamp <fiete.ostkamp@telekom.de>2024-02-26 13:08:47 +0000
commitb7ad55e5d91527b259cb9189237b3f01915c31f8 (patch)
tree4fe3a6f134411450f6b19e07a4b965db580cd912 /aai-rest/src
parente190b0b67803241ad3a94a6c6396fc47a94e7fac (diff)
Only load SchemaService related beans in aai-common when schema.translator.list=schema-service
- conditionally load schema-service related config, otherwise use the ConfigTranslator - this prepares locally running traversal via mvn spring-boot:run Issue-ID: AAI-3787 Change-Id: I9415802fb708933e8596b62e7540fa8a156e4cd6 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'aai-rest/src')
-rw-r--r--aai-rest/src/main/java/org/onap/aai/restclient/AAIRestClient.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/aai-rest/src/main/java/org/onap/aai/restclient/AAIRestClient.java b/aai-rest/src/main/java/org/onap/aai/restclient/AAIRestClient.java
index 05d5ec0f..393c6632 100644
--- a/aai-rest/src/main/java/org/onap/aai/restclient/AAIRestClient.java
+++ b/aai-rest/src/main/java/org/onap/aai/restclient/AAIRestClient.java
@@ -26,12 +26,16 @@ import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.context.annotation.Conditional;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.util.MultiValueMap;
@Component(value = ClientType.AAI)
+@ConditionalOnExpression("${aai-rest-client.enabled:false}")
public class AAIRestClient extends TwoWaySSLRestClient {
private static Logger logger = LoggerFactory.getLogger(AAIRestClient.class);