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

    Constructors
    Constructor
    Description
    AcrossApplicationRunner(Class<?>... primarySources)
     
    AcrossApplicationRunner(org.springframework.core.io.ResourceLoader resourceLoader, Class<?>... primarySources)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.springframework.context.ConfigurableApplicationContext
     
    static org.springframework.context.ConfigurableApplicationContext
    run(Class<?>[] primarySources, String[] args)
    Static helper that can be used to run an AcrossApplicationRunner from the specified sources using default settings and user supplied arguments.
    static org.springframework.context.ConfigurableApplicationContext
    run(Class<?> primarySource, String... args)
    Static helper that can be used to run an AcrossApplicationRunner 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AcrossApplicationRunner

      public AcrossApplicationRunner(Class<?>... primarySources)
    • AcrossApplicationRunner

      public AcrossApplicationRunner(org.springframework.core.io.ResourceLoader resourceLoader, Class<?>... primarySources)
  • Method Details

    • createApplicationContext

      protected org.springframework.context.ConfigurableApplicationContext createApplicationContext()
      Overrides:
      createApplicationContext in class org.springframework.boot.SpringApplication
    • run

      public static org.springframework.context.ConfigurableApplicationContext run(Class<?> primarySource, String... args)
      Static helper that can be used to run an AcrossApplicationRunner from the specified source using default settings.
      Parameters:
      primarySource - the primary source to load
      args - 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 an AcrossApplicationRunner from the specified sources using default settings and user supplied arguments.
      Parameters:
      primarySources - the primary sources to load
      args - the application arguments (usually passed from a Java main method)
      Returns:
      the running ApplicationContext