Class ApplicationContextRunner


An ApplicationContext runner for a standard, non-web environment ConfigurableApplicationContext.

See AbstractApplicationContextRunner for details.

Since:
2.0.0
Author:
Stephane Nicoll, Andy Wilkinson, Phillip Webb
  • Constructor Details

    • ApplicationContextRunner

      public ApplicationContextRunner()
      Create a new ApplicationContextRunner instance using an AnnotationConfigApplicationContext as the underlying source.
    • ApplicationContextRunner

      public ApplicationContextRunner(Supplier<ConfigurableApplicationContext> contextFactory)
      Create a new ApplicationContextRunner instance using the specified contextFactory as the underlying source.
      Parameters:
      contextFactory - a supplier that returns a new instance on each call be added to the application context proxy
    • ApplicationContextRunner

      public ApplicationContextRunner(Supplier<ConfigurableApplicationContext> contextFactory, Class<?>... additionalContextInterfaces)
      Create a new ApplicationContextRunner instance using the specified contextFactory as the underlying source.
      Parameters:
      contextFactory - a supplier that returns a new instance on each call
      additionalContextInterfaces - any additional application context interfaces to be added to the application context proxy
      Since:
      3.4.0