##### Coverage Report - com.ctrip.framework.apollo.configservice.ConfigServiceApplication

Classes in this File | Line Coverage | Branch Coverage | Complexity
ConfigServiceApplication |
0% | 0/6
N/A | N/A
| 1.0;1

1 |  |
     package com.ctrip.framework.apollo.configservice;
2 |  |
3 |  |
     import com.ctrip.framework.apollo.biz.ApolloBizConfig;
4 |  |
     import com.ctrip.framework.apollo.common.ApolloCommonConfig;
5 |  |
     import com.ctrip.framework.apollo.metaservice.ApolloMetaServiceConfig;
6 |  |
7 |  |
     import org.springframework.boot.actuate.system.ApplicationPidFileWriter;
8 |  |
     import org.springframework.boot.actuate.system.EmbeddedServerPortFileWriter;
9 |  |
     import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
10 |  |
     import org.springframework.boot.builder.SpringApplicationBuilder;
11 |  |
     import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
12 |  |
     import org.springframework.context.ConfigurableApplicationContext;
13 |  |
     import org.springframework.context.annotation.ComponentScan;
14 |  |
     import org.springframework.context.annotation.Configuration;
15 |  |
     import org.springframework.context.annotation.EnableAspectJAutoProxy;
16 |  |
     import org.springframework.context.annotation.PropertySource;
17 |  |
     import org.springframework.transaction.annotation.EnableTransactionManagement;
18 |  |
19 |  |
     /**
20 |  |
      * Spring boot application entry point
21 |  |
      *
22 |  |
      * @author Jason Song(song_s@ctrip.com)
23 |  |
      */
24 |  |
25 |  |
     @EnableEurekaServer
26 |  |
     @EnableAspectJAutoProxy
27 |  |
     @EnableAutoConfiguration // (exclude = EurekaClientConfigBean.class)
28 |  |
     @Configuration
29 |  |
     @EnableTransactionManagement
30 |  |
     @PropertySource(value = {"classpath:configservice.properties"})
31 |  |
     @ComponentScan(basePackageClasses = {ApolloCommonConfig.class,
32 |  |
         ApolloBizConfig.class,
33 |  |
         ConfigServiceApplication.class,
34 |  |
         ApolloMetaServiceConfig.class})
35 | 0 |
     public class ConfigServiceApplication {
36 |  |
37 |  |
       public static void main(String[] args) throws Exception {
38 | 0 |
         ConfigurableApplicationContext context =
39 | 0 |
             new SpringApplicationBuilder(ConfigServiceApplication.class).run(args);
40 | 0 |
         context.addApplicationListener(new ApplicationPidFileWriter());
41 | 0 |
         context.addApplicationListener(new EmbeddedServerPortFileWriter());
42 | 0 |
       }
43 |  |
44 |  |
     }