Naming micro-service - upgrade to spring-boot-2.
[ccsdk/apps.git] / ms / neng / src / main / java / org / onap / ccsdk / apps / ms / neng / core / Application.java
index 0edc38a..f92d2f1 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP : CCSDK.apps
  * ================================================================================
  * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2018 IBM.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -28,7 +29,7 @@ import org.springframework.boot.CommandLineRunner;
 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 org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
@@ -42,7 +43,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
 @EnableAsync
 public class Application extends SpringBootServletInitializer {
 
-    private Logger logger = LoggerFactory.getLogger(Application.class);
+    private Logger log = LoggerFactory.getLogger(Application.class);
 
     /**
      * Configures the application.
@@ -65,14 +66,14 @@ public class Application extends SpringBootServletInitializer {
     @Bean
     public CommandLineRunner commandLineRunner(ApplicationContext ctx) {
         return args -> {
-            logger.info("################################");
-            logger.info("Inspecting the beans provided by Spring Boot:");
+            log.info("################################");
+            log.info("Inspecting the beans provided by Spring Boot:");
             String[] beanNames = ctx.getBeanDefinitionNames();
             Arrays.sort(beanNames);
             for (String beanName : beanNames) {
-                System.out.println(beanName);
+                log.info(beanName);
             }
-            logger.info("################################");
+            log.info("################################");
         };
     }