Support 'headless' applications
Update SpringApplication to run by default in 'headless' mode. This prevents the AWT system from creating a Java icon (for example in the OSX dock). Also update builds to run tests in 'headless' mode.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2013 the original author or authors.
|
||||
* Copyright 2012-2014 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -90,6 +90,7 @@ public class SpringCli {
|
||||
* @return a return status code (non boot is used to indicate an error)
|
||||
*/
|
||||
public int runAndHandleErrors(String... args) {
|
||||
System.setProperty("java.awt.headless", Boolean.toString(true));
|
||||
String[] argsWithoutDebugFlags = removeDebugFlags(args);
|
||||
boolean debug = argsWithoutDebugFlags.length != args.length;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user