/** * Sets if the application is headless and should not instantiate AWT. Defaults to * {@code true} to prevent java icons appearing. * @param headless if the application is headless * @return the current builder */ public SpringApplicationBuilder headless(boolean headless) { this.application.setHeadless(headless); return this; }
public static void main(String[] args) { final SpringApplication application = new SpringApplication(SpringBootstrapper.class); application.setHeadless(true); application.setWebEnvironment(false); application.setRegisterShutdownHook(true); application.run(args); }
public static void main(String[] args) { SpringApplication app = new SpringApplication(PropertiesTester.class); app.setWebEnvironment(false); app.setHeadless(true); app.setLogStartupInfo(false); app.run(args); PropertiesTester pt = instance; pt.readCommands(); }
wasRestarted = Arrays.stream(args).anyMatch(x -> x.equals("restarted")); if (!options.has("quiet") && !options.has("nobrowser")) { hydraApplication.setHeadless(false);