public class SpringApplicationLauncher extends java.lang.Object
A launcher for SpringApplication or a SpringApplication subclass. The
class that is used can be configured using the System property
spring.application.class.name or the SPRING_APPLICATION_CLASS_NAME
environment variable. Uses reflection to allow the launching code to exist in a
separate ClassLoader from the application code.
| Constructor and description |
|---|
SpringApplicationLauncher(java.lang.ClassLoader classLoader)Creates a new launcher that will use the given classLoader to load the
configured SpringApplication class. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected java.lang.String |
getEnvironmentVariable(java.lang.String name) |
|
public java.lang.Object |
launch(java.lang.Class<?>[] sources, java.lang.String[] args)Launches the application created using the given sources. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Creates a new launcher that will use the given classLoader to load the
configured SpringApplication class.
classLoader - the ClassLoader to use Launches the application created using the given sources. The application
is launched with the given args.
sources - the sources for the applicationargs - the args for the applicationApplicationContext