X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Faai%2Fdatarouter%2FApplication.java;h=3ea6ab837d4a3a38babc7642884bd30c59772844;hb=refs%2Fchanges%2F53%2F40753%2F2;hp=dfd81442aa43f941c596d0a94f5e2baade1df6da;hpb=d46b0b9c3ce9ad5eca684ebeccb89f04d3cbcf6c;p=aai%2Fdata-router.git diff --git a/src/main/java/org/onap/aai/datarouter/Application.java b/src/main/java/org/onap/aai/datarouter/Application.java index dfd8144..3ea6ab8 100644 --- a/src/main/java/org/onap/aai/datarouter/Application.java +++ b/src/main/java/org/onap/aai/datarouter/Application.java @@ -20,15 +20,27 @@ */ package org.onap.aai.datarouter; -import org.springframework.boot.SpringApplication; +import java.util.HashMap; + +import org.eclipse.jetty.util.security.Password; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.support.SpringBootServletInitializer; @SpringBootApplication -public class Application { +public class Application extends SpringBootServletInitializer{ public static void main(String[] args) { - SpringApplication.run(Application.class, args); + String keyStorePassword = System.getProperty("KEY_STORE_PASSWORD"); + if(keyStorePassword==null || keyStorePassword.isEmpty()){ + throw new RuntimeException("Env property KEY_STORE_PASSWORD not set"); + } + HashMap props = new HashMap<>(); + props.put("server.ssl.key-store-password", Password.deobfuscate(keyStorePassword)); + new Application().configure(new SpringApplicationBuilder(Application.class).properties(props)).run(args); + + } } \ No newline at end of file