类 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 theTestContextBootstrapper
SPI.- Uses
WebDelegatingSmartContextLoader
as the defaultContextLoader
if the test class is annotated with@WebAppConfiguration
and otherwise delegates to the superclass. - Builds a
WebMergedContextConfiguration
if the test class is annotated with@WebAppConfiguration
.
- 从以下版本开始:
- 4.1
- 作者:
- Sam Brannen
构造器概要
构造器 构造器 说明 WebTestContextBootstrapper()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected Class<? extends ContextLoader>
getDefaultContextLoaderClass(Class<?> testClass)
ReturnsWebDelegatingSmartContextLoader
if the supplied class is annotated with@WebAppConfiguration
and otherwise delegates to the superclass.protected MergedContextConfiguration
processMergedContextConfiguration(MergedContextConfiguration mergedConfig)
Returns aWebMergedContextConfiguration
if the test class in the suppliedMergedContextConfiguration
is annotated with@WebAppConfiguration
and 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)
ReturnsWebDelegatingSmartContextLoader
if the supplied class is annotated with@WebAppConfiguration
and otherwise delegates to the superclass.- 覆盖:
getDefaultContextLoaderClass
在类中DefaultTestContextBootstrapper
- 参数:
testClass
- the test class for which to retrieve the defaultContextLoader
class- 返回:
- the default
ContextLoader
class for the supplied test class (nevernull
)
processMergedContextConfiguration
protected MergedContextConfiguration processMergedContextConfiguration(MergedContextConfiguration mergedConfig)
Returns aWebMergedContextConfiguration
if the test class in the suppliedMergedContextConfiguration
is annotated with@WebAppConfiguration
and otherwise returns the supplied instance unmodified.- 覆盖:
processMergedContextConfiguration
在类中AbstractTestContextBootstrapper
- 参数:
mergedConfig
- theMergedContextConfiguration
to process; nevernull
- 返回:
- a fully initialized
MergedContextConfiguration
; nevernull