Example usage for org.springframework.boot SpringApplication setHeadless

List of usage examples for org.springframework.boot SpringApplication setHeadless

Introduction

In this page you can find the example usage for org.springframework.boot SpringApplication setHeadless.

Prototype

public void setHeadless(boolean headless) 

Source Link

Document

Sets if the application is headless and should not instantiate AWT.

Usage

From source file:org.keyboardplaying.messaging.Launcher.java

/**
 * Runs the application.//from  www . j a v a 2s.co m
 *
 * @param args
 *            optional arguments (none expected)
 */
public static void main(String[] args) {
    SpringApplication application = new SpringApplication(Application.class);
    application.setHeadless(false);
    application.run(args);
}

From source file:com.ewerk.prototype.PrototypeApplication.java

public static void main(String[] args) {
    final ApplicationPidFileWriter pidFileWriter = new ApplicationPidFileWriter();
    pidFileWriter.setTriggerEventType(ApplicationEnvironmentPreparedEvent.class);

    SpringApplication application = new SpringApplication(PrototypeApplication.class);
    application.setHeadless(true);
    application.setRegisterShutdownHook(true);
    application.setLogStartupInfo(false);
    application.setWebEnvironment(true);
    application.addListeners(pidFileWriter);
    application.run(args);//from  ww  w.  j  a va  2 s  .  c  o  m

    LOG.info("Prototype launched [OK]");
}

From source file:org.talend.components.proptester.PropertiesTester.java

public static void main(String[] args) {
    SpringApplication app = new SpringApplication(PropertiesTester.class);
    app.setWebEnvironment(false);//  w ww  .  j a v a 2  s  . c o  m
    app.setShowBanner(false);
    app.setHeadless(true);
    app.setLogStartupInfo(false);
    app.run(args);
    PropertiesTester pt = instance;
    pt.readCommands();
}