Java 类org.springframework.boot.actuate.system.ApplicationPidFileWriter 实例源码

项目:apollo-custom    文件:ApolloApplication.java   
public static void main(String[] args) throws Exception {
  /**
   * Common
   */
  ConfigurableApplicationContext commonContext =
      new SpringApplicationBuilder(ApolloApplication.class).web(false).run(args);
  commonContext.addApplicationListener(new ApplicationPidFileWriter());
  logger.info(commonContext.getId() + " isActive: " + commonContext.isActive());

  /**
   * ConfigService
   */
  if (commonContext.getEnvironment().containsProperty("configservice")) {
    ConfigurableApplicationContext configContext =
        new SpringApplicationBuilder(ConfigServiceApplication.class).parent(commonContext)
            .sources(RefreshScope.class).run(args);
    logger.info(configContext.getId() + " isActive: " + configContext.isActive());
  }

  /**
   * AdminService
   */
  if (commonContext.getEnvironment().containsProperty("adminservice")) {
    ConfigurableApplicationContext adminContext =
        new SpringApplicationBuilder(AdminServiceApplication.class).parent(commonContext)
            .sources(RefreshScope.class).run(args);
    logger.info(adminContext.getId() + " isActive: " + adminContext.isActive());
  }

  /**
   * Portal
   */
  if (commonContext.getEnvironment().containsProperty("portal")) {
    ConfigurableApplicationContext portalContext =
        new SpringApplicationBuilder(PortalApplication.class).parent(commonContext)
            .sources(RefreshScope.class).run(args);
    logger.info(portalContext.getId() + " isActive: " + portalContext.isActive());
  }
}
项目:apollo-custom    文件:LocalApolloApplication.java   
public static void main(String[] args) throws Exception {
  /**
   * Common
   */
  ConfigurableApplicationContext commonContext =
      new SpringApplicationBuilder(ApolloApplication.class).web(false).run(args);
  commonContext.addApplicationListener(new ApplicationPidFileWriter());
  logger.info(commonContext.getId() + " isActive: " + commonContext.isActive());

  /**
   * ConfigService
   */
  if (commonContext.getEnvironment().containsProperty("configservice")) {
    ConfigurableApplicationContext configContext =
        new SpringApplicationBuilder(ConfigServiceApplication.class).parent(commonContext)
            .sources(RefreshScope.class).run(args);
    logger.info(configContext.getId() + " isActive: " + configContext.isActive());
  }

  /**
   * AdminService
   */
  if (commonContext.getEnvironment().containsProperty("adminservice")) {
    ConfigurableApplicationContext adminContext =
        new SpringApplicationBuilder(AdminServiceApplication.class).parent(commonContext)
            .sources(RefreshScope.class).run(args);
    logger.info(adminContext.getId() + " isActive: " + adminContext.isActive());
  }

  /**
   * Portal
   */
  if (commonContext.getEnvironment().containsProperty("portal")) {
    ConfigurableApplicationContext portalContext =
        new SpringApplicationBuilder(PortalApplication.class).parent(commonContext).run(args);
    logger.info(portalContext.getId() + " isActive: " + portalContext.isActive());
  }
}
项目:apollo    文件:ApolloApplication.java   
public static void main(String[] args) throws Exception {
  /**
   * Common
   */
  ConfigurableApplicationContext commonContext =
      new SpringApplicationBuilder(ApolloApplication.class).web(false).run(args);
  commonContext.addApplicationListener(new ApplicationPidFileWriter());
  logger.info(commonContext.getId() + " isActive: " + commonContext.isActive());

  /**
   * ConfigService
   */
  if (commonContext.getEnvironment().containsProperty("configservice")) {
    ConfigurableApplicationContext configContext =
        new SpringApplicationBuilder(ConfigServiceApplication.class).parent(commonContext)
            .sources(RefreshScope.class).run(args);
    logger.info(configContext.getId() + " isActive: " + configContext.isActive());
  }

  /**
   * AdminService
   */
  if (commonContext.getEnvironment().containsProperty("adminservice")) {
    ConfigurableApplicationContext adminContext =
        new SpringApplicationBuilder(AdminServiceApplication.class).parent(commonContext)
            .sources(RefreshScope.class).run(args);
    logger.info(adminContext.getId() + " isActive: " + adminContext.isActive());
  }

  /**
   * Portal
   */
  if (commonContext.getEnvironment().containsProperty("portal")) {
    ConfigurableApplicationContext portalContext =
        new SpringApplicationBuilder(PortalApplication.class).parent(commonContext)
            .sources(RefreshScope.class).run(args);
    logger.info(portalContext.getId() + " isActive: " + portalContext.isActive());
  }
}
项目:apollo    文件:LocalApolloApplication.java   
public static void main(String[] args) throws Exception {
  /**
   * Common
   */
  ConfigurableApplicationContext commonContext =
      new SpringApplicationBuilder(ApolloApplication.class).web(false).run(args);
  commonContext.addApplicationListener(new ApplicationPidFileWriter());
  logger.info(commonContext.getId() + " isActive: " + commonContext.isActive());

  /**
   * ConfigService
   */
  if (commonContext.getEnvironment().containsProperty("configservice")) {
    ConfigurableApplicationContext configContext =
        new SpringApplicationBuilder(ConfigServiceApplication.class).parent(commonContext)
            .sources(RefreshScope.class).run(args);
    logger.info(configContext.getId() + " isActive: " + configContext.isActive());
  }

  /**
   * AdminService
   */
  if (commonContext.getEnvironment().containsProperty("adminservice")) {
    ConfigurableApplicationContext adminContext =
        new SpringApplicationBuilder(AdminServiceApplication.class).parent(commonContext)
            .sources(RefreshScope.class).run(args);
    logger.info(adminContext.getId() + " isActive: " + adminContext.isActive());
  }

  /**
   * Portal
   */
  if (commonContext.getEnvironment().containsProperty("portal")) {
    ConfigurableApplicationContext portalContext =
        new SpringApplicationBuilder(PortalApplication.class).parent(commonContext).run(args);
    logger.info(portalContext.getId() + " isActive: " + portalContext.isActive());
  }
}
项目:excord    文件:Main.java   
public static void main(String[] args) throws Exception {
    LOGGER.info("Starting Server!");
    SpringApplication app = new SpringApplication(Main.class);
    app.addListeners(new ApplicationPidFileWriter());
    ApplicationContext ctx = app.run(args);

}
项目:sipgate-io-spring-boot    文件:Application.java   
public static void main(String[] args) throws Exception {
    //SpringApplication.run(Application.class, args);
    SpringApplication springApplication = new SpringApplication(Application.class);

    springApplication.addListeners( new ApplicationPidFileWriter() );
    springApplication.run(args);
}
项目:spring-cloud-showcase    文件:Application.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(Application.class);
    springApplication.setWebEnvironment(true);
    springApplication.addListeners(new ApplicationPidFileWriter("app.pid"));
    springApplication.addListeners(new EmbeddedServerPortFileWriter("app.port"));
    springApplication.run(args);
}
项目:spring-cloud-showcase    文件:Application.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(Application.class);
    springApplication.setWebEnvironment(true);
    springApplication.addListeners(new ApplicationPidFileWriter("app.pid"));
    springApplication.addListeners(new EmbeddedServerPortFileWriter("app.port"));
    springApplication.run(args);
}
项目:spring-cloud-showcase    文件:Application.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(Application.class);
    springApplication.setWebEnvironment(true);
    springApplication.addListeners(new ApplicationPidFileWriter("app.pid"));
    springApplication.addListeners(new EmbeddedServerPortFileWriter("app.port"));
    springApplication.run(args);
}
项目:spring-cloud-showcase    文件:Application.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(Application.class);
    springApplication.setWebEnvironment(true);
    springApplication.addListeners(new ApplicationPidFileWriter("app.pid"));
    springApplication.addListeners(new EmbeddedServerPortFileWriter("app.port"));
    springApplication.run(args);
}
项目:spring-cloud-showcase    文件:Application.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(Application.class);
    springApplication.setWebEnvironment(true);
    springApplication.addListeners(new ApplicationPidFileWriter("app.pid"));
    springApplication.addListeners(new EmbeddedServerPortFileWriter("app.port"));
    springApplication.run(args);
}
项目:spring-cloud-showcase    文件:Application.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(Application.class);
    springApplication.setWebEnvironment(true);
    springApplication.addListeners(new ApplicationPidFileWriter("app.pid"));
    springApplication.addListeners(new EmbeddedServerPortFileWriter("app.port"));
    springApplication.run(args);
}
项目:spring-cloud-showcase    文件:Application.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(Application.class);
    springApplication.setWebEnvironment(true);
    springApplication.addListeners(new ApplicationPidFileWriter("app.pid"));
    springApplication.addListeners(new EmbeddedServerPortFileWriter("app.port"));
    springApplication.run(args);
}
项目:spring-cloud-showcase    文件:Application.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(Application.class);
    springApplication.setWebEnvironment(true);
    springApplication.addListeners(new ApplicationPidFileWriter("app.pid"));
    springApplication.addListeners(new EmbeddedServerPortFileWriter("app.port"));
    springApplication.run(args);
}
项目:spring-cloud-showcase    文件:Application.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(Application.class);
    springApplication.setWebEnvironment(true);
    springApplication.addListeners(new ApplicationPidFileWriter("app.pid"));
    springApplication.addListeners(new EmbeddedServerPortFileWriter("app.port"));
    springApplication.run(args);
}
项目:spring-cloud-showcase    文件:Application.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(Application.class);
    springApplication.setWebEnvironment(true);
    springApplication.addListeners(new ApplicationPidFileWriter("app.pid"));
    springApplication.addListeners(new EmbeddedServerPortFileWriter("app.port"));
    springApplication.run(args);
}
项目:sample_spring-boot-camel-mongo-jdk8    文件:PrototypeApplication.java   
public static void main(final String... args) {
  final ApplicationPidFileWriter pidFileWriter = new ApplicationPidFileWriter();
  pidFileWriter.setTriggerEventType(ApplicationEnvironmentPreparedEvent.class);

  final SpringApplication application = new SpringApplication(PrototypeApplication.class);
  application.setHeadless(true);
  application.setRegisterShutdownHook(true);
  application.setLogStartupInfo(false);
  application.setWebEnvironment(true);
  application.addListeners(pidFileWriter);
  application.run(args);

  LOG.info("Prototype launched [OK]");
}
项目:apollo-custom    文件:PortalApplication.java   
public static void main(String[] args) throws Exception {
  ConfigurableApplicationContext context = SpringApplication.run(PortalApplication.class, args);
  context.addApplicationListener(new ApplicationPidFileWriter());
  context.addApplicationListener(new EmbeddedServerPortFileWriter());
}
项目:apollo-custom    文件:AdminServiceApplication.java   
public static void main(String[] args) {
  ConfigurableApplicationContext context =
      new SpringApplicationBuilder(AdminServiceApplication.class).run(args);
  context.addApplicationListener(new ApplicationPidFileWriter());
  context.addApplicationListener(new EmbeddedServerPortFileWriter());
}
项目:apollo-custom    文件:ConfigServiceApplication.java   
public static void main(String[] args) throws Exception {
  ConfigurableApplicationContext context =
      new SpringApplicationBuilder(ConfigServiceApplication.class).run(args);
  context.addApplicationListener(new ApplicationPidFileWriter());
  context.addApplicationListener(new EmbeddedServerPortFileWriter());
}
项目:apollo    文件:PortalApplication.java   
public static void main(String[] args) throws Exception {
  ConfigurableApplicationContext context = SpringApplication.run(PortalApplication.class, args);
  context.addApplicationListener(new ApplicationPidFileWriter());
  context.addApplicationListener(new EmbeddedServerPortFileWriter());
}
项目:apollo    文件:AdminServiceApplication.java   
public static void main(String[] args) {
  ConfigurableApplicationContext context =
      new SpringApplicationBuilder(AdminServiceApplication.class).run(args);
  context.addApplicationListener(new ApplicationPidFileWriter());
  context.addApplicationListener(new EmbeddedServerPortFileWriter());
}
项目:apollo    文件:ConfigServiceApplication.java   
public static void main(String[] args) throws Exception {
  ConfigurableApplicationContext context =
      new SpringApplicationBuilder(ConfigServiceApplication.class).run(args);
  context.addApplicationListener(new ApplicationPidFileWriter());
  context.addApplicationListener(new EmbeddedServerPortFileWriter());
}
项目:SpringBootAndSwaggerUI    文件:DemoApplication.java   
public static void main(String[] args) {
    final SpringApplication springApplication = new SpringApplication(DemoApplication.class);
    springApplication.addListeners(new ApplicationPidFileWriter("demo.pid"));
    springApplication.run(args);
}
项目:mojito    文件:Application.java   
public static void main(String[] args) throws IOException {

        SpringApplication springApplication = new SpringApplication(Application.class);
        springApplication.addListeners(new ApplicationPidFileWriter("application.pid"));
        springApplication.run(args);
    }
项目:graphite-monitor-example    文件:Application.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(Application.class);
    springApplication.addListeners(new ApplicationPidFileWriter(APPLICATION_PID));
    springApplication.run(args);
}
项目:jandy    文件:JandyApplicationServer.java   
public static void main(String[] args) {
  new SpringApplicationBuilder()
      .listeners(new ApplicationPidFileWriter())
      .sources(JandyApplicationServer.class)
      .run(args);
}
项目:spring-cloud-showcase    文件:Application.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(Application.class);
    springApplication.addListeners(new ApplicationPidFileWriter("app.pid"));
    springApplication.addListeners(new EmbeddedServerPortFileWriter("app.port"));
    springApplication.run(args);
}
项目:parkandrideAPI    文件:Application.java   
public static void main(String[] args) {
    SpringApplication app = new SpringApplication(Application.class);
    app.addListeners(new ApplicationPidFileWriter());
    app.run(args);
}
项目:enhanced-pet-clinic    文件:SampleWebUiApplication.java   
public static void main(String[] args) throws Exception {
    SpringApplication springApplication = new SpringApplication(SampleWebUiApplication.class);
    springApplication.addListeners(new ApplicationPidFileWriter(), new EmbeddedServerPortFileWriter());
    springApplication.run(args);
}
项目:OpenLRS    文件:Application.java   
public static void main(final String[] args) {
    SpringApplication springApplication = new SpringApplication(Application.class);
    springApplication.addListeners(new ApplicationPidFileWriter("openlrs.pid"));
    springApplication.run(args);
}