接口 AssertableWebApplicationContext
- 所有超级接口:
org.springframework.context.ApplicationContext
,ApplicationContextAssertProvider<org.springframework.web.context.ConfigurableWebApplicationContext>
,org.springframework.context.ApplicationEventPublisher
,org.assertj.core.api.AssertProvider<ApplicationContextAssert<org.springframework.web.context.ConfigurableWebApplicationContext>>
,AutoCloseable
,org.springframework.beans.factory.BeanFactory
,Closeable
,org.springframework.context.ConfigurableApplicationContext
,org.springframework.web.context.ConfigurableWebApplicationContext
,org.springframework.core.env.EnvironmentCapable
,org.springframework.beans.factory.HierarchicalBeanFactory
,org.springframework.context.Lifecycle
,org.springframework.beans.factory.ListableBeanFactory
,org.springframework.context.MessageSource
,org.springframework.core.io.ResourceLoader
,org.springframework.core.io.support.ResourcePatternResolver
,org.springframework.web.context.WebApplicationContext
public interface AssertableWebApplicationContext extends ApplicationContextAssertProvider<org.springframework.web.context.ConfigurableWebApplicationContext>, org.springframework.web.context.ConfigurableWebApplicationContext
AWebApplicationContext
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.- 从以下版本开始:
- 2.0.0
- 另请参阅:
WebApplicationContextRunner
,WebApplicationContext
字段概要
从接口继承的字段 org.springframework.context.ConfigurableApplicationContext
CONFIG_LOCATION_DELIMITERS, CONVERSION_SERVICE_BEAN_NAME, ENVIRONMENT_BEAN_NAME, LOAD_TIME_WEAVER_BEAN_NAME, SYSTEM_ENVIRONMENT_BEAN_NAME, SYSTEM_PROPERTIES_BEAN_NAME
方法概要
静态方法 修饰符和类型 方法 说明 static AssertableWebApplicationContext
get(Supplier<? extends org.springframework.web.context.ConfigurableWebApplicationContext> contextSupplier)
Factory method to create a newAssertableWebApplicationContext
instance.从接口继承的方法 org.springframework.context.ApplicationContext
getApplicationName, getAutowireCapableBeanFactory, getDisplayName, getId, getParent, getStartupDate
从接口继承的方法 org.springframework.boot.test.context.assertj.ApplicationContextAssertProvider
assertThat, close, getSourceApplicationContext, getSourceApplicationContext, getStartupFailure
从接口继承的方法 org.springframework.beans.factory.BeanFactory
containsBean, getAliases, getBean, getBean, getBean, getBean, getBean, getBeanProvider, getBeanProvider, getType, isPrototype, isSingleton, isTypeMatch, isTypeMatch
从接口继承的方法 org.springframework.context.ConfigurableApplicationContext
addApplicationListener, addBeanFactoryPostProcessor, addProtocolResolver, close, getBeanFactory, getEnvironment, isActive, refresh, registerShutdownHook, setEnvironment, setId, setParent
从接口继承的方法 org.springframework.web.context.ConfigurableWebApplicationContext
getConfigLocations, getNamespace, getServletConfig, setConfigLocation, setConfigLocations, setNamespace, setServletConfig, setServletContext
从接口继承的方法 org.springframework.beans.factory.HierarchicalBeanFactory
containsLocalBean, getParentBeanFactory
从接口继承的方法 org.springframework.beans.factory.ListableBeanFactory
containsBeanDefinition, findAnnotationOnBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanNamesForAnnotation, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeansOfType, getBeansOfType, getBeansWithAnnotation
方法详细资料
get
static AssertableWebApplicationContext get(Supplier<? extends org.springframework.web.context.ConfigurableWebApplicationContext> contextSupplier)
Factory method to create a newAssertableWebApplicationContext
instance.- 参数:
contextSupplier
- a supplier that will either return a fully configuredConfigurableWebApplicationContext
or throw an exception if the context fails to start.- 返回:
- a
AssertableWebApplicationContext
instance