diff options
author | 2018-11-16 14:53:30 +0530 | |
---|---|---|
committer | 2018-11-16 14:54:07 +0530 | |
commit | 5ff414eb2c19ce794548fa8b59d37c42c45fce72 (patch) | |
tree | c06696f34669e5aa034cd1a2b9300dd61f079f05 /ms/neng/src/main/java | |
parent | 009719f00f0ad2c5856d20a9c0acb71937ccc06c (diff) |
Sonar fix: Application.java
Fixed sonar issues across this file
Issue-ID: CCSDK-726
Change-Id: I416500a26f258cba87576a80c9da371a8a8f1a88
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'ms/neng/src/main/java')
-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("################################"); }; } |