aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/usecaseui/server/listener/UsecaseServerEventListener.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/onap/usecaseui/server/listener/UsecaseServerEventListener.java')
-rw-r--r--src/main/java/org/onap/usecaseui/server/listener/UsecaseServerEventListener.java45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/main/java/org/onap/usecaseui/server/listener/UsecaseServerEventListener.java b/src/main/java/org/onap/usecaseui/server/listener/UsecaseServerEventListener.java
new file mode 100644
index 00000000..2590d2c7
--- /dev/null
+++ b/src/main/java/org/onap/usecaseui/server/listener/UsecaseServerEventListener.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2017 CMCC, Inc. and others. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onap.usecaseui.server.listener;
+
+import org.onap.usecaseui.server.service.InitializationService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.context.event.ApplicationReadyEvent;
+import org.springframework.context.ApplicationListener;
+
+/**
+ * <一句话功能简述>
+ * <功能详细描述>
+ * @author donghu
+ * @version [版本号, 2017年8月17日]
+ * @see [相关类/方法]
+ * @since [产品/模块版本]
+ */
+public class UsecaseServerEventListener implements ApplicationListener<ApplicationReadyEvent>
+{
+ private static final Logger logger = LoggerFactory.getLogger(UsecaseServerEventListener.class);
+
+ @Autowired
+ InitializationService initializationService;
+
+ public void onApplicationEvent(ApplicationReadyEvent arg0)
+ {
+ initializationService.initialize();
+ }
+
+}