diff options
author | Ravi Geda <gravik@amdocs.com> | 2018-11-28 18:14:33 +0000 |
---|---|---|
committer | Ravi Geda <gravik@amdocs.com> | 2018-11-29 09:47:16 +0000 |
commit | 9ae8ae65c0aff6b8fd4e94460b44af33cf15aa50 (patch) | |
tree | d54422cab7ef90fdd8a66038326550506004419f /src/main/java/org/onap/crud/CrudApplication.java | |
parent | 18f7af386802e750ad983ba2cdf4d9b84b4ed5ed (diff) |
Upgrade version of aai-common
Update OXM Model Loader and Edge Rules Loader to use the 1810 schema
ingestion mechanism.
Update tests accordingly.
Change-Id: I979951fcdcaf901c508c30d770b83dfa3d52bde4
Issue-ID: AAI-1952
Signed-off-by: Ravi Geda <gravik@amdocs.com>
Diffstat (limited to 'src/main/java/org/onap/crud/CrudApplication.java')
-rw-r--r-- | src/main/java/org/onap/crud/CrudApplication.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/main/java/org/onap/crud/CrudApplication.java b/src/main/java/org/onap/crud/CrudApplication.java index a1531f1..b2b2611 100644 --- a/src/main/java/org/onap/crud/CrudApplication.java +++ b/src/main/java/org/onap/crud/CrudApplication.java @@ -20,9 +20,8 @@ */ package org.onap.crud; -import java.util.HashMap; -import java.util.Map; import java.util.Collections; +import java.util.HashMap; import javax.annotation.PostConstruct; @@ -31,6 +30,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.support.SpringBootServletInitializer; +import org.springframework.context.annotation.Import; import org.springframework.context.annotation.ImportResource; import org.springframework.core.env.Environment; @@ -47,21 +47,22 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; */ @SpringBootApplication @EnableSwagger2 +@Import({SchemaIngestConfiguration.class, SchemaLoaderConfiguration.class}) @ImportResource({"file:${SERVICE_BEANS}/*.xml"}) public class CrudApplication extends SpringBootServletInitializer{// NOSONAR @Autowired private Environment env; - + public static void main(String[] args) {// NOSONAR String keyStorePassword = System.getProperty("KEY_STORE_PASSWORD"); if(keyStorePassword==null || keyStorePassword.isEmpty()){ throw new RuntimeException("Env property KEY_STORE_PASSWORD not set"); } - Map<String, Object> props = new HashMap<>(); + HashMap<String, Object> props = new HashMap<>(); props.put("server.ssl.key-store-password", Password.deobfuscate(keyStorePassword)); - new CrudApplication().configure(new SpringApplicationBuilder(CrudApplication.class).properties(props)).run(args); + new CrudApplication().configure(new SpringApplicationBuilder(SchemaIngestConfiguration.class, SchemaLoaderConfiguration.class).child(CrudApplication.class).properties(props)).run(args); } - + /** * Set required trust store system properties using values from application.properties */ @@ -84,9 +85,9 @@ public class CrudApplication extends SpringBootServletInitializer{// NOSONAR public static final ApiInfo DEFAULT_API_INFO = new ApiInfo("AAI NCSO Adapter Service", "AAI NCSO Adapter Service.", "1.0", "urn:tos", DEFAULT_CONTACT, "Apache 2.0", "API license URL", Collections.emptyList()); - - - public Docket api() { + + + public Docket api() { return new Docket(DocumentationType.SWAGGER_2).apiInfo(DEFAULT_API_INFO).select().paths(PathSelectors.any()) .apis(RequestHandlerSelectors.basePackage("org.onap.crud")).build(); } |