当前位置: 首页>>代码示例>>Java>>正文


Java ApplicationPidFileWriter类代码示例

本文整理汇总了Java中org.springframework.boot.system.ApplicationPidFileWriter的典型用法代码示例。如果您正苦于以下问题:Java ApplicationPidFileWriter类的具体用法?Java ApplicationPidFileWriter怎么用?Java ApplicationPidFileWriter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ApplicationPidFileWriter类属于org.springframework.boot.system包,在下文中一共展示了ApplicationPidFileWriter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: main

import org.springframework.boot.system.ApplicationPidFileWriter; //导入依赖的package包/类
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());
    }
}
 
开发者ID:redlink-gmbh,项目名称:smarti,代码行数:26,代码来源:Application.java

示例2: main

import org.springframework.boot.system.ApplicationPidFileWriter; //导入依赖的package包/类
/**
 * @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);
    }
}
 
开发者ID:CiscoCTA,项目名称:taxii-log-adapter,代码行数:24,代码来源:AdapterRunner.java

示例3: main

import org.springframework.boot.system.ApplicationPidFileWriter; //导入依赖的package包/类
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!");
}
 
开发者ID:evoila,项目名称:cfsummiteu2017,代码行数:8,代码来源:Application.java

示例4: main

import org.springframework.boot.system.ApplicationPidFileWriter; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:nemerosa,项目名称:ontrack,代码行数:16,代码来源:Application.java

示例5: main

import org.springframework.boot.system.ApplicationPidFileWriter; //导入依赖的package包/类
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(ApplicationStart.class);
    springApplication.addListeners(new ApplicationPidFileWriter("thrush.pid"), new ThrushApplicationListener());
    springApplication.run(args);
}
 
开发者ID:justice-code,项目名称:Thrush,代码行数:6,代码来源:ApplicationStart.java

示例6: main

import org.springframework.boot.system.ApplicationPidFileWriter; //导入依赖的package包/类
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(ConsoleApplicationStart.class);
    springApplication.addListeners(new ApplicationPidFileWriter("console.pid"));
    springApplication.run(args);
}
 
开发者ID:justice-code,项目名称:star-map,代码行数:6,代码来源:ConsoleApplicationStart.java

示例7: main

import org.springframework.boot.system.ApplicationPidFileWriter; //导入依赖的package包/类
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(TaskApplicationStart.class);
    springApplication.addListeners(new ApplicationPidFileWriter("task.pid"));
    springApplication.run(args);
}
 
开发者ID:justice-code,项目名称:star-map,代码行数:6,代码来源:TaskApplicationStart.java

示例8: applicationPidFileWriter

import org.springframework.boot.system.ApplicationPidFileWriter; //导入依赖的package包/类
public static ApplicationListener<?> applicationPidFileWriter() {
    return new ApplicationPidFileWriter("app.pid");
}
 
开发者ID:amvnetworks,项目名称:amv-access-api-poc,代码行数:4,代码来源:AmvAccessApplication.java

示例9: main

import org.springframework.boot.system.ApplicationPidFileWriter; //导入依赖的package包/类
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(RagnarApplication.class);
    springApplication.addListeners(new ApplicationPidFileWriter());
    springApplication.run(args);
}
 
开发者ID:weiboad,项目名称:fiery,代码行数:6,代码来源:RagnarApplication.java

示例10: main

import org.springframework.boot.system.ApplicationPidFileWriter; //导入依赖的package包/类
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication(ApplicationStart.class);
    springApplication.addListeners(new ApplicationPidFileWriter("qiuqiu.pid"));
    springApplication.run(args);
}
 
开发者ID:justice-code,项目名称:QiuQiu,代码行数:6,代码来源:ApplicationStart.java

示例11: main

import org.springframework.boot.system.ApplicationPidFileWriter; //导入依赖的package包/类
public static void main(String[] args) throws SQLException, ClassNotFoundException {
    final SpringApplication application = new SpringApplication(ServicesInOneApplication.class);
    application.addListeners(new ApplicationPidFileWriter());
    application.run(args);
}
 
开发者ID:nus-ncl,项目名称:services-in-one,代码行数:6,代码来源:ServicesInOneApplication.java

示例12: main

import org.springframework.boot.system.ApplicationPidFileWriter; //导入依赖的package包/类
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication( DispatcherApplication.class);
    ApplicationPidFileWriter applicationPidFileWriter = new ApplicationPidFileWriter();
    springApplication.addListeners( applicationPidFileWriter );
    springApplication.run(args);
}
 
开发者ID:EMBL-EBI-SUBS-OLD,项目名称:subs,代码行数:7,代码来源:DispatcherApplication.java

示例13: main

import org.springframework.boot.system.ApplicationPidFileWriter; //导入依赖的package包/类
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication( SamplesAgentApplication.class);
    ApplicationPidFileWriter applicationPidFileWriter = new ApplicationPidFileWriter();
    springApplication.addListeners( applicationPidFileWriter );
    springApplication.run(args);
}
 
开发者ID:EMBL-EBI-SUBS-OLD,项目名称:subs,代码行数:7,代码来源:SamplesAgentApplication.java

示例14: main

import org.springframework.boot.system.ApplicationPidFileWriter; //导入依赖的package包/类
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication( ProgressMonitorApp.class);
    ApplicationPidFileWriter applicationPidFileWriter = new ApplicationPidFileWriter();
    springApplication.addListeners( applicationPidFileWriter );
    springApplication.run(args);
}
 
开发者ID:EMBL-EBI-SUBS-OLD,项目名称:subs,代码行数:7,代码来源:ProgressMonitorApp.java

示例15: main

import org.springframework.boot.system.ApplicationPidFileWriter; //导入依赖的package包/类
public static void main(String[] args) {
    SpringApplication springApplication = new SpringApplication( ApiApplication.class);
    ApplicationPidFileWriter applicationPidFileWriter = new ApplicationPidFileWriter();
    springApplication.addListeners( applicationPidFileWriter );
    springApplication.run(args);
}
 
开发者ID:EMBL-EBI-SUBS-OLD,项目名称:subs,代码行数:7,代码来源:ApiApplication.java


注:本文中的org.springframework.boot.system.ApplicationPidFileWriter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。