类的使用
org.springframework.test.context.ContextConfiguration
使用ContextConfiguration的程序包 程序包 说明 org.springframework.test.context This package contains the Spring TestContext Framework which provides annotation-driven unit and integration testing support that is agnostic of the actual testing framework in use.org.springframework.test.context.junit.jupiter Core support for integrating the Spring TestContext Framework with the JUnit Jupiter extension model in JUnit 5.org.springframework.test.context.junit.jupiter.web Web support for integrating the Spring TestContext Framework with the JUnit Jupiter extension model in JUnit 5.org.springframework.test.context中ContextConfiguration的使用
返回ContextConfiguration的org.springframework.test.context中的方法 修饰符和类型 方法 说明 ContextConfiguration[]
value()
A list of@ContextConfiguration
instances, each of which defines a level in the context hierarchy.参数类型为ContextConfiguration的org.springframework.test.context中的构造器 构造器 说明 ContextConfigurationAttributes(Class<?> declaringClass, ContextConfiguration contextConfiguration)
Construct a newContextConfigurationAttributes
instance for the supplied@ContextConfiguration
annotation and the test class that declared it.org.springframework.test.context.junit.jupiter中ContextConfiguration的使用
注释类型为ContextConfiguration的org.springframework.test.context.junit.jupiter中的类 修饰符和类型 类 说明 interface
SpringJUnitConfig
@SpringJUnitConfig
is a composed annotation that combines@ExtendWith(SpringExtension.class)
from JUnit Jupiter with@ContextConfiguration
from the Spring TestContext Framework.org.springframework.test.context.junit.jupiter.web中ContextConfiguration的使用
注释类型为ContextConfiguration的org.springframework.test.context.junit.jupiter.web中的类 修饰符和类型 类 说明 interface
SpringJUnitWebConfig
@SpringJUnitWebConfig
is a composed annotation that combines@ExtendWith(SpringExtension.class)
from JUnit Jupiter with@ContextConfiguration
and@WebAppConfiguration
from the Spring TestContext Framework.