summaryrefslogtreecommitdiffstats
path: root/asdc-controller
diff options
context:
space:
mode:
authorElena Kuleshov <evn@att.com>2019-04-16 04:01:40 -0400
committerElena Kuleshov <evn@att.com>2019-04-16 05:39:37 -0400
commit06602f553f5e6f4edb1ef342973e7132f04ca812 (patch)
tree5ab656e2cb5e52e6e362ee74876354d4db9126e9 /asdc-controller
parentfce553bd98117eac13a6d52dd85030771f058468 (diff)
Add back activity spec install
Add back activity spec install Change-Id: Idd7a85b902182424669946b568217483c3c76f79 Issue-ID: SO-1726 Signed-off-by: Kuleshov, Elena <evn@att.com>
Diffstat (limited to 'asdc-controller')
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/Application.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/Application.java b/asdc-controller/src/main/java/org/onap/so/asdc/Application.java
index 1f66291283..a05eeea466 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/Application.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/Application.java
@@ -20,17 +20,25 @@
package org.onap.so.asdc;
+import javax.annotation.PostConstruct;
+import org.onap.so.asdc.activity.DeployActivitySpecs;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication(scanBasePackages = {"org.onap.so"})
@EnableScheduling
+@EnableJpaRepositories("org.onap.so.db.catalog.data.repository")
public class Application {
private static final String MSO_CONFIG_PATH = "mso.config.path";
private static final String LOGS_DIR = "logs_dir";
+ @Autowired
+ DeployActivitySpecs deployActivitySpecs;
+
private static void setLogsDir() {
if (System.getProperty(LOGS_DIR) == null) {
System.getProperties().setProperty(LOGS_DIR, "./logs/asdc/");
@@ -42,6 +50,15 @@ public class Application {
System.getProperties().setProperty(MSO_CONFIG_PATH, ".");
}
+ @PostConstruct
+ private void deployActivities() {
+ try {
+ deployActivitySpecs.deployActivities();
+ } catch (Exception e) {
+ }
+
+ }
+
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
System.getProperties().setProperty("mso.db", "MARIADB");