diff options
author | Dan Timoney <dtimoney@att.com> | 2018-11-19 22:41:40 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-11-19 22:41:40 +0000 |
commit | 3cb968034e410bd19c1e822605ec2dc2c487e66a (patch) | |
tree | 01fdd5c0b601e465b0f1600a9b5b0d4eb7e0a282 /ms/neng/src/main | |
parent | 4858eb877b1f84df205b7d2c48595c2f708257a1 (diff) | |
parent | 5ff414eb2c19ce794548fa8b59d37c42c45fce72 (diff) |
Merge "Sonar fix: Application.java"
Diffstat (limited to 'ms/neng/src/main')
-rw-r--r-- | ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/Application.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/Application.java b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/Application.java index 6efa94de..0edc38a3 100644 --- a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/Application.java +++ b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/Application.java @@ -21,6 +21,9 @@ package org.onap.ccsdk.apps.ms.neng.core; import java.util.Arrays; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -38,6 +41,9 @@ import org.springframework.scheduling.annotation.EnableAsync; @ComponentScan(basePackages = "org.onap.ccsdk") @EnableAsync public class Application extends SpringBootServletInitializer { + + private Logger logger = LoggerFactory.getLogger(Application.class); + /** * Configures the application. */ @@ -49,7 +55,7 @@ public class Application extends SpringBootServletInitializer { /** * Entry point for the application. */ - public static void main(String[] args) throws Exception { + public static void main(String[] args) { SpringApplication.run(Application.class, args); } @@ -59,14 +65,14 @@ public class Application extends SpringBootServletInitializer { @Bean public CommandLineRunner commandLineRunner(ApplicationContext ctx) { return args -> { - System.out.println("################################"); - System.out.println("Inspecting the beans provided by Spring Boot:"); + logger.info("################################"); + logger.info("Inspecting the beans provided by Spring Boot:"); String[] beanNames = ctx.getBeanDefinitionNames(); Arrays.sort(beanNames); for (String beanName : beanNames) { System.out.println(beanName); } - System.out.println("################################"); + logger.info("################################"); }; } |