377e71bf3b32543a18162cac00c23562b244708f
[sdc/dcae-d/dt-be-main.git] / dcaedt_catalog / asdc / src / main / java / org / onap / sdc / dcae / catalog / asdc / ASDCUtilsController.java
1 package org.onap.sdc.dcae.catalog.asdc;
2
3 import org.onap.sdc.common.onaplog.Enums.LogLevel;
4 import org.onap.sdc.common.onaplog.OnapLoggerDebug;
5 import org.springframework.beans.BeansException;
6 import org.springframework.boot.context.properties.ConfigurationProperties;
7 import org.springframework.context.ApplicationContext;
8 import org.springframework.context.ApplicationContextAware;
9 import org.springframework.web.bind.annotation.RestController;
10
11 import javax.annotation.PostConstruct;
12 import javax.annotation.PreDestroy;
13
14
15 @RestController
16 @ConfigurationProperties(prefix="asdcUtilsController")
17 public class ASDCUtilsController implements ApplicationContextAware {
18
19         private OnapLoggerDebug debugLogger = OnapLoggerDebug.getInstance();
20
21         public void setApplicationContext(ApplicationContext theCtx) throws BeansException {
22                 // no use for app context
23         }
24
25         @PostConstruct
26         public void initController() {
27                 debugLogger.log(LogLevel.DEBUG, this.getClass().getName(),"initASDCUtilsController");
28                 debugLogger.log(LogLevel.DEBUG, this.getClass().getName(),"ASDCUtilsController started");
29         }
30
31         @PreDestroy
32         public void cleanupController() {
33                 debugLogger.log(LogLevel.DEBUG, this.getClass().getName(),"cleanupASDCUtilsController");
34         }
35
36 }