クラス TestContextAotGenerator
java.lang.ObjectSE
org.springframework.test.context.aot.TestContextAotGenerator
TestContextAotGenerator は、Spring TestContext フレームワークからのサポートに依存する統合テスト用の AOT アーティファクトを生成します。- 導入:
- 6.0
- 作成者:
- Sam Brannen
- 関連事項:
フィールドのサマリー
フィールド修飾子と型フィールド説明static final StringSEfailOnErrorフラグの設定に使用される JVM システムプロパティ: "spring.test.aot.processing.failOnError"。コンストラクターの概要
コンストラクターコンストラクター説明TestContextAotGenerator(GeneratedFiles generatedFiles) 提供されたGeneratedFilesを使用する新しいTestContextAotGeneratorを作成します。TestContextAotGenerator(GeneratedFiles generatedFiles, RuntimeHints runtimeHints) TestContextAotGenerator(GeneratedFiles generatedFiles, RuntimeHints runtimeHints, boolean failOnError) メソッドのサマリー
修飾子と型メソッド説明final RuntimeHintsAOT 処理中に収集されたRuntimeHintsを取得します。voidprocessAheadOfTime(StreamSE<ClassSE<?>> testClasses) 提供された Spring 統合テストクラスのそれぞれを処理し、AOT アーティファクトを生成します。
フィールドの詳細
FAIL_ON_ERROR_PROPERTY_NAME
failOnErrorフラグの設定に使用される JVM システムプロパティ: "spring.test.aot.processing.failOnError"。failOnErrorフラグは、Spring TestContext フレームワークでの AOT 処理中に発生したエラーがプロセス全体を失敗させる例外を引き起こすかどうかを制御します。デフォルトは
trueです。サポートされている値には、大文字と小文字を区別せずに、
trueまたはfalseが含まれます。例: コマンドライン経由で次の JVM システムプロパティを指定すると、デフォルトをfalseに変更できます。-Dspring.test.aot.processing.failOnError=false
あるいは、
SpringPropertiesメカニズムを介して構成することもできます。- 導入:
- 6.1
- 関連事項:
コンストラクターの詳細
TestContextAotGenerator
提供されたGeneratedFilesを使用する新しいTestContextAotGeneratorを作成します。- パラメーター:
generatedFiles- 使用するGeneratedFiles- 関連事項:
TestContextAotGenerator
提供されたGeneratedFilesおよびRuntimeHintsを使用する新しいTestContextAotGeneratorを作成します。このコンストラクターは、"spring.test.aot.processing.failOnError" プロパティを介して
failOnErrorフラグの値を検索します。プロパティが設定されていない場合、デフォルトはtrueになります。- パラメーター:
generatedFiles- 使用するGeneratedFilesruntimeHints- 使用するRuntimeHints- 関連事項:
TestContextAotGenerator
public TestContextAotGenerator(GeneratedFiles generatedFiles, RuntimeHints runtimeHints, boolean failOnError) - パラメーター:
generatedFiles- 使用するGeneratedFilesruntimeHints- 使用するRuntimeHintsfailOnError-trueAOT 処理中にエラーが発生し、プロセス全体が失敗する例外が発生する場合- 導入:
- 6.1
メソッドの詳細
getRuntimeHints
AOT 処理中に収集されたRuntimeHintsを取得します。processAheadOfTime
提供された Spring 統合テストクラスのそれぞれを処理し、AOT アーティファクトを生成します。- 例外:
TestContextAotException- AOT 処理中にエラーが発生した場合