类 WebTestContextBootstrapper
- java.lang.Object
- org.springframework.test.context.support.AbstractTestContextBootstrapper
- org.springframework.test.context.support.DefaultTestContextBootstrapper
- org.springframework.test.context.web.WebTestContextBootstrapper
- 所有已实现的接口:
TestContextBootstrapper
public class WebTestContextBootstrapper extends DefaultTestContextBootstrapper
Web-specific implementation of theTestContextBootstrapperSPI.- Uses
WebDelegatingSmartContextLoaderas the defaultContextLoaderif the test class is annotated with@WebAppConfigurationand otherwise delegates to the superclass. - Builds a
WebMergedContextConfigurationif the test class is annotated with@WebAppConfiguration.
- 从以下版本开始:
- 4.1
- 作者:
- Sam Brannen
构造器概要
构造器 构造器 说明 WebTestContextBootstrapper()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected Class<? extends ContextLoader>getDefaultContextLoaderClass(Class<?> testClass)ReturnsWebDelegatingSmartContextLoaderif the supplied class is annotated with@WebAppConfigurationand otherwise delegates to the superclass.protected MergedContextConfigurationprocessMergedContextConfiguration(MergedContextConfiguration mergedConfig)Returns aWebMergedContextConfigurationif the test class in the suppliedMergedContextConfigurationis annotated with@WebAppConfigurationand otherwise returns the supplied instance unmodified.从类继承的方法 org.springframework.test.context.support.AbstractTestContextBootstrapper
buildMergedContextConfiguration, buildTestContext, getBootstrapContext, getCacheAwareContextLoaderDelegate, getContextCustomizerFactories, getDefaultTestExecutionListenerClasses, getDefaultTestExecutionListenerClassNames, getTestExecutionListeners, resolveContextLoader, resolveExplicitContextLoaderClass, setBootstrapContext
构造器详细资料
WebTestContextBootstrapper
public WebTestContextBootstrapper()
方法详细资料
getDefaultContextLoaderClass
protected Class<? extends ContextLoader> getDefaultContextLoaderClass(Class<?> testClass)
ReturnsWebDelegatingSmartContextLoaderif the supplied class is annotated with@WebAppConfigurationand otherwise delegates to the superclass.- 覆盖:
getDefaultContextLoaderClass在类中DefaultTestContextBootstrapper- 参数:
testClass- the test class for which to retrieve the defaultContextLoaderclass- 返回:
- the default
ContextLoaderclass for the supplied test class (nevernull)
processMergedContextConfiguration
protected MergedContextConfiguration processMergedContextConfiguration(MergedContextConfiguration mergedConfig)
Returns aWebMergedContextConfigurationif the test class in the suppliedMergedContextConfigurationis annotated with@WebAppConfigurationand otherwise returns the supplied instance unmodified.- 覆盖:
processMergedContextConfiguration在类中AbstractTestContextBootstrapper- 参数:
mergedConfig- theMergedContextConfigurationto process; nevernull- 返回:
- a fully initialized
MergedContextConfiguration; nevernull