diff options
author | Shwetank Dave <shwetank.dave@amdocs.com> | 2018-04-03 16:30:01 -0400 |
---|---|---|
committer | Shwetank Dave <shwetank.dave@amdocs.com> | 2018-04-03 17:49:28 -0400 |
commit | d947be024297ca589b11b1f0121d715003ea887e (patch) | |
tree | d5f82b16d10711bcc9103801c85b0f1b50ee6680 /src/main/java | |
parent | ce701746049abfd94a87b46e43f296faf32d6213 (diff) |
[AAI-804] Updating files to fix search service.
Issue-ID: AAI-804
Change-Id: Ie50f821cd235ccd5c627c11294da4b29bf29fc16
Signed-off-by: Shwetank Dave <shwetank.dave@amdocs.com>
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/onap/aai/sa/Application.java | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/src/main/java/org/onap/aai/sa/Application.java b/src/main/java/org/onap/aai/sa/Application.java index 2ccebd1..69dab1e 100644 --- a/src/main/java/org/onap/aai/sa/Application.java +++ b/src/main/java/org/onap/aai/sa/Application.java @@ -20,34 +20,26 @@ */
package org.onap.aai.sa;
-// import org.eclipse.jetty.util.security.Password;
-
+import org.eclipse.jetty.util.security.Password;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.support.SpringBootServletInitializer;
+
+import java.util.HashMap;
@SpringBootApplication
-public class Application {
+public class Application extends SpringBootServletInitializer {
+
-// public static String[] deobfuscateArgs(String[] args, String ... attrnames) {
-//
-// String[] deobfuscatedArgs = args.clone();
-//
-// Password.deobfuscate("HI");
-//
-// //System.setProperty(arg0, arg1)
-//
-// return deobfuscatedArgs;
-// }
-//
public static void main(String[] args) {
-
- //server.ssl.key-store-password=onapSecret
- //server.ssl.key-password=onapSecret
-// args = new String[]{"-Dserver.ssl.key-store-password", "onapSecret",
-// "-Dserver.ssl.key-password", "onapSecret"};
-
- SpringApplication.run(Application.class, args);
- //deobfuscateArgs(args, "server.ssl.key-store-password", "server.ssl.key-password"));
+ String keyStorePassword = System.getProperty("KEY_STORE_PASSWORD");
+ if(keyStorePassword==null || keyStorePassword.isEmpty()){
+ throw new RuntimeException("Env property KEY_STORE_PASSWORD not set");
+ }
+ HashMap<String, Object> props = new HashMap<>();
+ props.put("server.ssl.key-store-password", Password.deobfuscate(keyStorePassword));
+ new Application().configure(new SpringApplicationBuilder (Application.class).properties(props)).run(args);
}
}
|