程序包 org.springframework.boot.test.context
Classes and annotations related to configuring Spring's
ApplicationContext
for tests.接口概要 接口 说明 DefaultTestExecutionListenersPostProcessor Callback interface trigger fromSpringBootTestContextBootstrapper
that can be used to post-process the list of defaultTestExecutionListener
classes to be used by a test.类概要 类 说明 AnnotatedClassFinder Utility class to find a class annotated with a particular annotation in a hierarchy.ConfigFileApplicationContextInitializer ApplicationContextInitializer
that can be used with theContextConfiguration.initializers()
to trigger loading of application.properties.FilteredClassLoader TestURLClassLoader
that can filter the classes and resources it can load.FilteredClassLoader.ClassFilter Filter to restrict the classes that can be loaded.FilteredClassLoader.ClassPathResourceFilter Filter to restrict the resources that can be loaded.FilteredClassLoader.PackageFilter Filter to restrict the packages that can be loaded.ReactiveWebMergedContextConfiguration Encapsulates the merged context configuration declared on a test class and all of its superclasses for a reactive web application.SpringBootContextLoader AContextLoader
that can be used to test Spring Boot applications (those that normally startup usingSpringApplication
).SpringBootTestContextBootstrapper TestContextBootstrapper
for Spring Boot.枚举概要 枚举 说明 SpringBootTest.WebEnvironment An enumeration web environment modes.注释类型概要 注释类型 说明 SpringBootTest Annotation that can be specified on a test class that runs Spring Boot based tests.TestComponent @Component
that can be used when a bean is intended only for tests, and should be excluded from Spring Boot's component scanning.TestConfiguration @Configuration
that can be used to define additional beans or customizations for a test.