Interface AssertableWebApplicationContext
- All Superinterfaces:
- ApplicationContext,- ApplicationContextAssertProvider<ConfigurableWebApplicationContext>,- ApplicationEventPublisher,- org.assertj.core.api.AssertProvider<ApplicationContextAssert<ConfigurableWebApplicationContext>>,- AutoCloseable,- BeanFactory,- Closeable,- ConfigurableApplicationContext,- ConfigurableWebApplicationContext,- EnvironmentCapable,- HierarchicalBeanFactory,- Lifecycle,- ListableBeanFactory,- MessageSource,- ResourceLoader,- ResourcePatternResolver,- WebApplicationContext
public interface AssertableWebApplicationContext
extends ApplicationContextAssertProvider<ConfigurableWebApplicationContext>, ConfigurableWebApplicationContext
A 
WebApplicationContext that additionally supports AssertJ style assertions.
 Can be used to decorate an existing servlet web application context or an application
 context that failed to start.
 
 See ApplicationContextAssertProvider for more details.
- Since:
- 2.0.0
- Author:
- Phillip Webb
- See Also:
- 
Field SummaryFields inherited from interface org.springframework.beans.factory.BeanFactoryFACTORY_BEAN_PREFIXFields inherited from interface org.springframework.context.ConfigurableApplicationContextAPPLICATION_STARTUP_BEAN_NAME, CONFIG_LOCATION_DELIMITERS, CONVERSION_SERVICE_BEAN_NAME, ENVIRONMENT_BEAN_NAME, LOAD_TIME_WEAVER_BEAN_NAME, SHUTDOWN_HOOK_THREAD_NAME, SYSTEM_ENVIRONMENT_BEAN_NAME, SYSTEM_PROPERTIES_BEAN_NAMEFields inherited from interface org.springframework.web.context.ConfigurableWebApplicationContextAPPLICATION_CONTEXT_ID_PREFIX, SERVLET_CONFIG_BEAN_NAMEFields inherited from interface org.springframework.core.io.ResourceLoaderCLASSPATH_URL_PREFIXFields inherited from interface org.springframework.core.io.support.ResourcePatternResolverCLASSPATH_ALL_URL_PREFIXFields inherited from interface org.springframework.web.context.WebApplicationContextCONTEXT_ATTRIBUTES_BEAN_NAME, CONTEXT_PARAMETERS_BEAN_NAME, ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, SCOPE_APPLICATION, SCOPE_REQUEST, SCOPE_SESSION, SERVLET_CONTEXT_BEAN_NAME
- 
Method SummaryStatic MethodsModifier and TypeMethodDescriptionget(Supplier<? extends ConfigurableWebApplicationContext> contextSupplier) Factory method to create a newAssertableWebApplicationContextinstance.Methods inherited from interface org.springframework.context.ApplicationContextgetApplicationName, getAutowireCapableBeanFactory, getDisplayName, getId, getParent, getStartupDateMethods inherited from interface org.springframework.boot.test.context.assertj.ApplicationContextAssertProviderassertThat, close, getSourceApplicationContext, getSourceApplicationContext, getStartupFailureMethods inherited from interface org.springframework.context.ApplicationEventPublisherpublishEvent, publishEventMethods inherited from interface org.springframework.beans.factory.BeanFactorycontainsBean, getAliases, getBean, getBean, getBean, getBean, getBean, getBeanProvider, getBeanProvider, getType, getType, isPrototype, isSingleton, isTypeMatch, isTypeMatchMethods inherited from interface org.springframework.context.ConfigurableApplicationContextaddApplicationListener, addBeanFactoryPostProcessor, addProtocolResolver, close, getApplicationStartup, getBeanFactory, getEnvironment, isActive, refresh, registerShutdownHook, removeApplicationListener, setApplicationStartup, setClassLoader, setEnvironment, setId, setParentMethods inherited from interface org.springframework.web.context.ConfigurableWebApplicationContextgetConfigLocations, getNamespace, getServletConfig, setConfigLocation, setConfigLocations, setNamespace, setServletConfig, setServletContextMethods inherited from interface org.springframework.beans.factory.HierarchicalBeanFactorycontainsLocalBean, getParentBeanFactoryMethods inherited from interface org.springframework.beans.factory.ListableBeanFactorycontainsBeanDefinition, findAllAnnotationsOnBean, findAnnotationOnBean, findAnnotationOnBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanNamesForAnnotation, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanProvider, getBeanProvider, getBeansOfType, getBeansOfType, getBeansWithAnnotationMethods inherited from interface org.springframework.context.MessageSourcegetMessage, getMessage, getMessageMethods inherited from interface org.springframework.core.io.ResourceLoadergetClassLoader, getResourceMethods inherited from interface org.springframework.core.io.support.ResourcePatternResolvergetResourcesMethods inherited from interface org.springframework.web.context.WebApplicationContextgetServletContext
- 
Method Details- 
getstatic AssertableWebApplicationContext get(Supplier<? extends ConfigurableWebApplicationContext> contextSupplier) Factory method to create a newAssertableWebApplicationContextinstance.- Parameters:
- contextSupplier- a supplier that will either return a fully configured- ConfigurableWebApplicationContextor throw an exception if the context fails to start.
- Returns:
- a AssertableWebApplicationContextinstance
 
 
-