类 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.
- 从以下版本开始:
- 2.0.0
- 作者:
- Stephane Nicoll, Andy Wilkinson, Phillip Webb
-
嵌套类概要
从类继承的嵌套类/接口 org.springframework.boot.test.context.runner.AbstractApplicationContextRunner
AbstractApplicationContextRunner.BeanRegistration<T>, AbstractApplicationContextRunner.RunnerConfiguration<C extends ConfigurableApplicationContext> -
构造器概要
构造器构造器说明Create a newApplicationContextRunnerinstance using anAnnotationConfigApplicationContextas the underlying source.ApplicationContextRunner(Supplier<ConfigurableApplicationContext> contextFactory) Create a newApplicationContextRunnerinstance using the specifiedcontextFactoryas the underlying source.ApplicationContextRunner(Supplier<ConfigurableApplicationContext> contextFactory, Class<?>... additionalContextInterfaces) Create a newApplicationContextRunnerinstance using the specifiedcontextFactoryas the underlying source. -
方法概要
从类继承的方法 org.springframework.boot.test.context.runner.AbstractApplicationContextRunner
prepare, run, with, withAllowBeanDefinitionOverriding, withAllowCircularReferences, withBean, withBean, withBean, withBean, withClassLoader, withConfiguration, withInitializer, withParent, withPropertyValues, withSystemProperties, withUserConfiguration
-
构造器详细资料
-
ApplicationContextRunner
public ApplicationContextRunner()Create a newApplicationContextRunnerinstance using anAnnotationConfigApplicationContextas the underlying source. -
ApplicationContextRunner
Create a newApplicationContextRunnerinstance using the specifiedcontextFactoryas the underlying source.- 参数:
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 newApplicationContextRunnerinstance using the specifiedcontextFactoryas the underlying source.- 参数:
contextFactory- a supplier that returns a new instance on each calladditionalContextInterfaces- any additional application context interfaces to be added to the application context proxy- 从以下版本开始:
- 3.4.0
-