Example usage for Java org.springframework.boot SpringApplication fields, constructors, methods, implement or subclass
The text is from its open source code.
String | BANNER_LOCATION_PROPERTY Banner location property key. |
SpringApplication(Class>... primarySources) Create a new SpringApplication instance. | |
SpringApplication | |
SpringApplication(ResourceLoader resourceLoader, Class>... primarySources) Create a new SpringApplication instance. |
void | addInitializers(ApplicationContextInitializer>... initializers) Add ApplicationContextInitializer s to be applied to the Spring ApplicationContext . |
void | addListeners(ApplicationListener>... listeners) Add ApplicationListener s to be applied to the SpringApplication and registered with the ApplicationContext . |
void | addPrimarySources(Collection Add additional items to the primary sources that will be added to an ApplicationContext when #run(String) is called. |
int | exit(ApplicationContext context, ExitCodeGenerator... exitCodeGenerators) Static helper that can be used to exit a SpringApplication and obtain a code indicating success (0) or otherwise. |
Set | getAllSources() Return an immutable set of all the sources that will be added to an ApplicationContext when #run(String) is called. |
Class> | getClass() Returns the runtime class of this Object . |
Set | getListeners() Returns read-only ordered Set of the ApplicationListener s that will be applied to the SpringApplication and registered with the ApplicationContext . |
ResourceLoader | getResourceLoader() The ResourceLoader that will be used in the ApplicationContext. |
Set | getSources() Returns a mutable set of the sources that will be added to an ApplicationContext when #run(String) is called. |
ConfigurableApplicationContext | run(String... args) Run the Spring application, creating and refreshing a new ApplicationContext . |
ConfigurableApplicationContext | run(Class> primarySource, String... args) Static helper that can be used to run a SpringApplication from the specified source using default settings. |
ConfigurableApplicationContext | run(Class>[] primarySources, String[] args) Static helper that can be used to run a SpringApplication from the specified sources using default settings and user supplied arguments. |
void | setAdditionalProfiles(String... profiles) Set additional profile values to use (on top of those set in system or command line properties). |
void | setApplicationContextClass( Class extends ConfigurableApplicationContext> applicationContextClass) Sets the type of Spring ApplicationContext that will be created. |
void | setBanner(Banner banner) Sets the Banner instance which will be used to print the banner when no static banner file is provided. |
void | setBannerMode(Banner.Mode bannerMode) Sets the mode used to display the banner when the application runs. |
void | setDefaultProperties(Map Set default environment properties which will be used in addition to those in the existing Environment . |
void | setDefaultProperties(Properties defaultProperties) Convenient alternative to #setDefaultProperties(Map) . |
void | setHeadless(boolean headless) Sets if the application is headless and should not instantiate AWT. |
void | setLogStartupInfo(boolean logStartupInfo) Sets if the application information should be logged when the application starts. |
void | setRegisterShutdownHook(boolean registerShutdownHook) Sets if the created ApplicationContext should have a shutdown hook registered. |
void | setSources(Set Set additional sources that will be used to create an ApplicationContext. |
void | setWebApplicationType(WebApplicationType webApplicationType) Sets the type of web application to be run. |