2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
6 * Modifications Copyright (C) 2018 IBM.
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
22 package org.onap.ccsdk.apps.ms.neng.core;
24 import java.util.Arrays;
26 import org.slf4j.Logger;
27 import org.slf4j.LoggerFactory;
28 import org.springframework.boot.CommandLineRunner;
29 import org.springframework.boot.SpringApplication;
30 import org.springframework.boot.autoconfigure.SpringBootApplication;
31 import org.springframework.boot.builder.SpringApplicationBuilder;
32 import org.springframework.boot.web.support.SpringBootServletInitializer;
33 import org.springframework.context.ApplicationContext;
34 import org.springframework.context.annotation.Bean;
35 import org.springframework.context.annotation.ComponentScan;
36 import org.springframework.scheduling.annotation.EnableAsync;
39 * Entry point for the micro-service -- it starts up the application.
41 @SpringBootApplication
42 @ComponentScan(basePackages = "org.onap.ccsdk")
44 public class Application extends SpringBootServletInitializer {
46 private Logger log = LoggerFactory.getLogger(Application.class);
49 * Configures the application.
52 protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
53 return application.sources(Application.class);
57 * Entry point for the application.
59 public static void main(String[] args) {
60 SpringApplication.run(Application.class, args);
64 * Prints diagnostic information after application startup.
67 public CommandLineRunner commandLineRunner(ApplicationContext ctx) {
69 log.info("################################");
70 log.info("Inspecting the beans provided by Spring Boot:");
71 String[] beanNames = ctx.getBeanDefinitionNames();
72 Arrays.sort(beanNames);
73 for (String beanName : beanNames) {
76 log.info("################################");