Package com.foreach.across
Class AcrossApplicationRunner
java.lang.Object
org.springframework.boot.SpringApplication
com.foreach.across.AcrossApplicationRunner
public class AcrossApplicationRunner
extends org.springframework.boot.SpringApplication
Custom
SpringApplication
extension that will immediately use an AcrossListableBeanFactory
as the bean factory for the root ApplicationContext
. This ensures it is no
longer required to introduce an artificial parent bean factory in the hierarchy, as the root factory
will support exposed beans.
AcrossApplicationRunner
should be a drop-in replacement for SpringApplication
, which can
reduce some overhead of an Across application.- Since:
- 5.0.0
- Author:
- Arne Vandamme
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.boot.SpringApplication
org.springframework.boot.SpringApplication.AbandonedRunException, org.springframework.boot.SpringApplication.Augmented, org.springframework.boot.SpringApplication.Running
-
Field Summary
Fields inherited from class org.springframework.boot.SpringApplication
BANNER_LOCATION_PROPERTY, BANNER_LOCATION_PROPERTY_VALUE
-
Constructor Summary
ConstructorDescriptionAcrossApplicationRunner
(Class<?>... primarySources) AcrossApplicationRunner
(org.springframework.core.io.ResourceLoader resourceLoader, Class<?>... primarySources) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.context.ConfigurableApplicationContext
static org.springframework.context.ConfigurableApplicationContext
Static helper that can be used to run anAcrossApplicationRunner
from the specified sources using default settings and user supplied arguments.static org.springframework.context.ConfigurableApplicationContext
Static helper that can be used to run anAcrossApplicationRunner
from the specified source using default settings.Methods inherited from class org.springframework.boot.SpringApplication
addBootstrapRegistryInitializer, addInitializers, addListeners, addPrimarySources, afterRefresh, applyInitializers, bindToSpringApplication, configureEnvironment, configureProfiles, configurePropertySources, createBeanDefinitionLoader, exit, from, getAdditionalProfiles, getAllSources, getApplicationLog, getApplicationStartup, getClassLoader, getEnvironmentPrefix, getInitializers, getListeners, getMainApplicationClass, getResourceLoader, getShutdownHandlers, getSources, getWebApplicationType, isKeepAlive, load, logStartupInfo, logStartupProfileInfo, main, postProcessApplicationContext, refresh, registerLoggedException, run, setAddCommandLineProperties, setAddConversionService, setAdditionalProfiles, setAllowBeanDefinitionOverriding, setAllowCircularReferences, setApplicationContextFactory, setApplicationStartup, setBanner, setBannerMode, setBeanNameGenerator, setDefaultProperties, setDefaultProperties, setEnvironment, setEnvironmentPrefix, setHeadless, setInitializers, setKeepAlive, setLazyInitialization, setListeners, setLogStartupInfo, setMainApplicationClass, setRegisterShutdownHook, setResourceLoader, setSources, setWebApplicationType, withHook, withHook
-
Constructor Details
-
AcrossApplicationRunner
-
AcrossApplicationRunner
public AcrossApplicationRunner(org.springframework.core.io.ResourceLoader resourceLoader, Class<?>... primarySources)
-
-
Method Details
-
createApplicationContext
protected org.springframework.context.ConfigurableApplicationContext createApplicationContext()- Overrides:
createApplicationContext
in classorg.springframework.boot.SpringApplication
-
run
public static org.springframework.context.ConfigurableApplicationContext run(Class<?> primarySource, String... args) Static helper that can be used to run anAcrossApplicationRunner
from the specified source using default settings.- Parameters:
primarySource
- the primary source to loadargs
- the application arguments (usually passed from a Java main method)- Returns:
- the running
ApplicationContext
-
run
public static org.springframework.context.ConfigurableApplicationContext run(Class<?>[] primarySources, String[] args) Static helper that can be used to run anAcrossApplicationRunner
from the specified sources using default settings and user supplied arguments.- Parameters:
primarySources
- the primary sources to loadargs
- the application arguments (usually passed from a Java main method)- Returns:
- the running
ApplicationContext
-