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

项目:smarti    文件:Application.java   
public static void main(String[] args) {
    final SpringApplication app = new SpringApplication(Application.class);
    // save the pid into a file...
    app.addListeners(new ApplicationPidFileWriter("smarti.pid"));

    final ConfigurableApplicationContext context = app.run(args);
    final ConfigurableEnvironment env = context.getEnvironment();

    try {
        //http://localhost:8080/admin/index.html
        final URI uri = new URI(
                (env.getProperty("server.ssl.enabled", Boolean.class, false) ? "https" : "http"),
                null,
                (env.getProperty("server.address", "localhost")),
                (env.getProperty("server.port", Integer.class, 8080)),
                (env.getProperty("server.context-path", "/")).replaceAll("//+", "/"),
                null, null);

        log.info("{} started: {}",
                env.getProperty("server.display-name", context.getDisplayName()),
                uri);
    } catch (URISyntaxException e) {
        log.warn("Could not build launch-url: {}", e.getMessage());
    }
}
项目:taxii-log-adapter    文件:AdapterRunner.java   
/**
 * @param args The command line arguments.
 */
@SuppressFBWarnings(value="DM_DEFAULT_ENCODING", justification="DEV-NULL encoding is irrelevant")
public static void main(String[] args) {
    try (PrintStream devNull = new PrintStream(ByteStreams.nullOutputStream()))
    {
        System.setErr(devNull);
        ctx = new SpringApplicationBuilder(
                ScheduleConfiguration.class,
                RunNowConfiguration.class,
                SmokeTestConfiguration.class,
                RunConfigConfiguration.class)
            .bannerMode(Mode.OFF)
            .listeners(new ApplicationPidFileWriter())
            .web(false)
            .run(args);
        ctx.start();

    } catch (Throwable t) {
        errHandler.handle(t);
    }
}
项目:cfsummiteu2017    文件:Application.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(Application.class);
    springApplication.addListeners(new ApplicationPidFileWriter());
    ApplicationContext ctx = springApplication.run(args);

    Assert.notNull(ctx, "May not be null!");
}
项目:ontrack    文件:Application.java   
/**
 * Start-up point
 *
 * @param args Arguments passed to the program, they may contain configuration variables.
 */
public static void main(String[] args) {

    // PID file
    File pid = new File("ontrack.pid");

    // Runs the application
    SpringApplication application = new SpringApplication(Application.class);
    application.addListeners(new ApplicationPidFileWriter(pid));
    application.run(args);
}
项目:Thrush    文件:ApplicationStart.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(ApplicationStart.class);
    springApplication.addListeners(new ApplicationPidFileWriter("thrush.pid"), new ThrushApplicationListener());
    springApplication.run(args);
}
项目:star-map    文件:ConsoleApplicationStart.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(ConsoleApplicationStart.class);
    springApplication.addListeners(new ApplicationPidFileWriter("console.pid"));
    springApplication.run(args);
}
项目:star-map    文件:TaskApplicationStart.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(TaskApplicationStart.class);
    springApplication.addListeners(new ApplicationPidFileWriter("task.pid"));
    springApplication.run(args);
}
项目:amv-access-api-poc    文件:AmvAccessApplication.java   
public static ApplicationListener<?> applicationPidFileWriter() {
    return new ApplicationPidFileWriter("app.pid");
}
项目:fiery    文件:RagnarApplication.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(RagnarApplication.class);
    springApplication.addListeners(new ApplicationPidFileWriter());
    springApplication.run(args);
}
项目:QiuQiu    文件:ApplicationStart.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(ApplicationStart.class);
    springApplication.addListeners(new ApplicationPidFileWriter("qiuqiu.pid"));
    springApplication.run(args);
}
项目:services-in-one    文件:ServicesInOneApplication.java   
public static void main(String[] args) throws SQLException, ClassNotFoundException {
    final SpringApplication application = new SpringApplication(ServicesInOneApplication.class);
    application.addListeners(new ApplicationPidFileWriter());
    application.run(args);
}
项目:subs    文件:DispatcherApplication.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication( DispatcherApplication.class);
    ApplicationPidFileWriter applicationPidFileWriter = new ApplicationPidFileWriter();
    springApplication.addListeners( applicationPidFileWriter );
    springApplication.run(args);
}
项目:subs    文件:SamplesAgentApplication.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication( SamplesAgentApplication.class);
    ApplicationPidFileWriter applicationPidFileWriter = new ApplicationPidFileWriter();
    springApplication.addListeners( applicationPidFileWriter );
    springApplication.run(args);
}
项目:subs    文件:ProgressMonitorApp.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication( ProgressMonitorApp.class);
    ApplicationPidFileWriter applicationPidFileWriter = new ApplicationPidFileWriter();
    springApplication.addListeners( applicationPidFileWriter );
    springApplication.run(args);
}
项目:subs    文件:ApiApplication.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication( ApiApplication.class);
    ApplicationPidFileWriter applicationPidFileWriter = new ApplicationPidFileWriter();
    springApplication.addListeners( applicationPidFileWriter );
    springApplication.run(args);
}
项目:subs    文件:ApiSupportApplication.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication( ApiSupportApplication.class);
    ApplicationPidFileWriter applicationPidFileWriter = new ApplicationPidFileWriter();
    springApplication.addListeners( applicationPidFileWriter );
    springApplication.run(args);
}
项目:stockAnalysis    文件:ApplicationStart.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(ApplicationStart.class);
    springApplication.addListeners(new ApplicationPidFileWriter("stock.pid"));
    springApplication.run(args);
}
项目:Persephone    文件:PersephoneApplication.java   
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(PersephoneApplication.class);

    springApplication.addListeners(new ApplicationPidFileWriter());

    springApplication.run(args);
}