类 SpringBootContextLoader

java.lang.Object
org.springframework.test.context.support.AbstractContextLoader
org.springframework.boot.test.context.SpringBootContextLoader
所有已实现的接口:
AotContextLoader, ContextLoader, SmartContextLoader

public class SpringBootContextLoader extends AbstractContextLoader implements AotContextLoader
A ContextLoader that can be used to test Spring Boot applications (those that normally startup using SpringApplication). Although this loader can be used directly, most test will instead want to use it with @SpringBootTest.

The loader supports both standard MergedContextConfiguration as well as WebMergedContextConfiguration. If WebMergedContextConfiguration is used the context will either use a mock servlet environment, or start the full embedded web server.

If @ActiveProfiles are provided in the test class they will be used to create the application context.

从以下版本开始:
1.4.0
作者:
Dave Syer, Phillip Webb, Andy Wilkinson, Stephane Nicoll, Madhura Bhave, Scott Frederick
另请参阅: