public class ApplicationContextRunner extends AbstractApplicationContextRunner<ApplicationContextRunner,org.springframework.context.ConfigurableApplicationContext,AssertableApplicationContext>
ApplicationContext runner
for a standard,
non-web environment ConfigurableApplicationContext
.
See AbstractApplicationContextRunner
for details.
AbstractApplicationContextRunner.BeanRegistration<T>
Constructor and Description |
---|
ApplicationContextRunner()
Create a new
ApplicationContextRunner instance using an
AnnotationConfigApplicationContext as the underlying source. |
ApplicationContextRunner(Supplier<org.springframework.context.ConfigurableApplicationContext> contextFactory)
Create a new
ApplicationContextRunner instance using the specified
contextFactory as the underlying source. |
Modifier and Type | Method and Description |
---|---|
protected ApplicationContextRunner |
newInstance(Supplier<org.springframework.context.ConfigurableApplicationContext> contextFactory,
List<org.springframework.context.ApplicationContextInitializer<? super org.springframework.context.ConfigurableApplicationContext>> initializers,
TestPropertyValues environmentProperties,
TestPropertyValues systemProperties,
ClassLoader classLoader,
org.springframework.context.ApplicationContext parent,
List<AbstractApplicationContextRunner.BeanRegistration<?>> beanRegistrations,
List<Configurations> configurations) |
run, with, withBean, withBean, withBean, withBean, withClassLoader, withConfiguration, withInitializer, withParent, withPropertyValues, withSystemProperties, withUserConfiguration
public ApplicationContextRunner()
ApplicationContextRunner
instance using an
AnnotationConfigApplicationContext
as the underlying source.public ApplicationContextRunner(Supplier<org.springframework.context.ConfigurableApplicationContext> contextFactory)
ApplicationContextRunner
instance using the specified
contextFactory
as the underlying source.contextFactory
- a supplier that returns a new instance on each callprotected ApplicationContextRunner newInstance(Supplier<org.springframework.context.ConfigurableApplicationContext> contextFactory, List<org.springframework.context.ApplicationContextInitializer<? super org.springframework.context.ConfigurableApplicationContext>> initializers, TestPropertyValues environmentProperties, TestPropertyValues systemProperties, ClassLoader classLoader, org.springframework.context.ApplicationContext parent, List<AbstractApplicationContextRunner.BeanRegistration<?>> beanRegistrations, List<Configurations> configurations)
newInstance
in class AbstractApplicationContextRunner<ApplicationContextRunner,org.springframework.context.ConfigurableApplicationContext,AssertableApplicationContext>
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.