public class ApplicationContextRunner extends AbstractApplicationContextRunner<ApplicationContextRunner,org.springframework.context.ConfigurableApplicationContext,AssertableApplicationContext>
ApplicationContext runner
for a standard,
non-web environment ConfigurableApplicationContext
.
See AbstractApplicationContextRunner
for details.
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<org.springframework.context.ConfigurableApplicationContext>> initializers,
TestPropertyValues environmentProperties,
TestPropertyValues systemProperties,
ClassLoader classLoader,
org.springframework.context.ApplicationContext parent,
List<Configurations> configurations) |
run, with, 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<org.springframework.context.ConfigurableApplicationContext>> initializers, TestPropertyValues environmentProperties, TestPropertyValues systemProperties, ClassLoader classLoader, org.springframework.context.ApplicationContext parent, List<Configurations> configurations)
newInstance
in class AbstractApplicationContextRunner<ApplicationContextRunner,org.springframework.context.ConfigurableApplicationContext,AssertableApplicationContext>
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.