diff options
author | Michael Arrastia <MArrasti@amdocs.com> | 2018-11-28 17:27:31 +0000 |
---|---|---|
committer | Michael Arrastia <MArrasti@amdocs.com> | 2018-11-28 17:27:31 +0000 |
commit | d894ec51a86cfb4d711d3c053d8aa46759584456 (patch) | |
tree | c60a1680d735c5c76bc1e9ec625be6140d4b7667 /src/main/java/org/onap/aai/spike/SpikeApplication.java | |
parent | 9eb82afe62f6891d1e140fd9003e1ceb7df119ee (diff) |
Upgrade version of aai-common
* Configure Spike with schema ingestion beans.
* Update OXMModelLoader and EdgeRulesLoader to make use of schema
ingestion beans. Here there is an acknowledged awkward marrying of
bean creation and static method use.
* Update tests to mock schema ingestion beans and organise test
resources.
Change-Id: I1f043aa5852dbd2737a804ebc282a12afb9fb39f
Issue-ID: AAI-1951
Signed-off-by: Michael Arrastia <MArrasti@amdocs.com>
Diffstat (limited to 'src/main/java/org/onap/aai/spike/SpikeApplication.java')
-rw-r--r-- | src/main/java/org/onap/aai/spike/SpikeApplication.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/main/java/org/onap/aai/spike/SpikeApplication.java b/src/main/java/org/onap/aai/spike/SpikeApplication.java index 426731b..2768c24 100644 --- a/src/main/java/org/onap/aai/spike/SpikeApplication.java +++ b/src/main/java/org/onap/aai/spike/SpikeApplication.java @@ -1,5 +1,5 @@ /** - * ============LICENSE_START======================================================= + * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. @@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; +import org.springframework.context.annotation.Import; import org.springframework.context.annotation.ImportResource; import org.springframework.core.env.Environment; @@ -34,20 +35,23 @@ import org.springframework.core.env.Environment; * Spike service Spring Boot Application */ @SpringBootApplication +@Import({SchemaIngestConfiguration.class}) @ImportResource({"file:${SERVICE_BEANS}/*.xml"}) public class SpikeApplication extends SpringBootServletInitializer { @Autowired private Environment env; - + public static void main(String[] args) { String keyStorePassword = System.getProperty("KEY_STORE_PASSWORD"); if (keyStorePassword == null || keyStorePassword.isEmpty()) { throw new IllegalArgumentException("System Property KEY_STORE_PASSWORD not set"); } + HashMap<String, Object> props = new HashMap<>(); props.put("server.ssl.key-store-password", Password.deobfuscate(keyStorePassword)); - new SpikeApplication().configure(new SpringApplicationBuilder(SpikeApplication.class).properties(props)) - .run(args); + + new SpikeApplication().configure(new SpringApplicationBuilder(SchemaIngestConfiguration.class) + .child(SpikeApplication.class).properties(props)).run(args); } /** @@ -67,4 +71,5 @@ public class SpikeApplication extends SpringBootServletInitializer { } } } + } |