NonRT-RIC A1 Northbound API
[nonrtric.git] / sdnc-a1-controller / oam / configbackuprestore / vnfconfigbackupservice / src / main / java / com / onap / sdnc / vnfbackupservice / config / ApplicationConfiguration.java
1 /*
2 * ============LICENSE_START=======================================================
3 * ONAP : SDNC-FEATURES
4 * ================================================================================
5 * Copyright 2018 TechMahindra
6 *=================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 *     http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
19 */
20 package com.onap.sdnc.vnfbackupservice.config;
21
22 import org.apache.logging.log4j.LogManager;
23 import org.apache.logging.log4j.Logger;
24 import org.springframework.boot.SpringApplication;
25 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
26 import org.springframework.boot.autoconfigure.SpringBootApplication;
27 import org.springframework.boot.autoconfigure.domain.EntityScan;
28 import org.springframework.context.annotation.Bean;
29 import org.springframework.context.annotation.ComponentScan;
30 import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
31 import org.springframework.web.client.RestTemplate;
32
33 @SpringBootApplication
34 @EnableJpaRepositories("com.onap.sdnc.*")
35 @EntityScan("com.onap.sdnc.*")
36 @ComponentScan({"com.onap.sdnc.*"})
37 @EnableAutoConfiguration
38 public class ApplicationConfiguration {
39         private static final Logger logger = LogManager.getLogger(ApplicationConfiguration.class);
40         public static void main(String[] args) {
41                 
42                 SpringApplication.run(ApplicationConfiguration.class, args);
43                 logger.info("SDNC REPORTS API Has Started..");
44         }
45         @Bean
46         public RestTemplate template() {
47                 return new RestTemplate();
48         }
49 }