クラス SpringBootContextLoader

java.lang.ObjectSE
org.springframework.test.context.support.AbstractContextLoader
org.springframework.boot.test.context.SpringBootContextLoader
実装されたすべてのインターフェース:
AotContextLoaderContextLoaderSmartContextLoader

public class SpringBootContextLoader extends AbstractContextLoader implements AotContextLoader
Spring Boot アプリケーション(通常は SpringApplication を使用して起動するアプリケーション)のテストに使用できる ContextLoader。このローダーは直接使用できますが、ほとんどのテストでは @SpringBootTest と一緒に使用する必要があります。

ローダーは、標準の MergedContextConfigurationWebMergedContextConfiguration の両方をサポートしています。WebMergedContextConfiguration を使用する場合、コンテキストはモックサーブレット環境を使用するか、完全な組み込み Web サーバーを起動します。

@ActiveProfiles がテストクラスで提供されている場合、アプリケーションコンテキストの作成に使用されます。

導入:
1.4.0
作成者:
Dave Syer, Phillip Webb, Andy Wilkinson, Stephane Nicoll, Madhura Bhave, Scott Frederick
関連事項: