Class ApplicationContextRunner
java.lang.Object
org.springframework.boot.test.context.runner.AbstractApplicationContextRunner<ApplicationContextRunner,ConfigurableApplicationContext,AssertableApplicationContext>
org.springframework.boot.test.context.runner.ApplicationContextRunner
public class ApplicationContextRunner
extends AbstractApplicationContextRunner<ApplicationContextRunner,ConfigurableApplicationContext,AssertableApplicationContext>
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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner
AbstractApplicationContextRunner.BeanRegistration<T>, AbstractApplicationContextRunner.RunnerConfiguration<C extends ConfigurableApplicationContext>
-
Constructor Summary
ConstructorDescriptionCreate a newApplicationContextRunner
instance using anAnnotationConfigApplicationContext
as the underlying source.ApplicationContextRunner
(Supplier<ConfigurableApplicationContext> contextFactory) Create a newApplicationContextRunner
instance using the specifiedcontextFactory
as the underlying source. -
Method Summary
Methods inherited from class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner
run, with, withAllowBeanDefinitionOverriding, withAllowCircularReferences, withBean, withBean, withBean, withBean, withClassLoader, withConfiguration, withInitializer, withParent, withPropertyValues, withSystemProperties, withUserConfiguration
-
Constructor Details
-
ApplicationContextRunner
public ApplicationContextRunner()Create a newApplicationContextRunner
instance using anAnnotationConfigApplicationContext
as the underlying source. -
ApplicationContextRunner
Create a newApplicationContextRunner
instance using the specifiedcontextFactory
as the underlying source.- Parameters:
contextFactory
- a supplier that returns a new instance on each call
-