@FunctionalInterfaceSE public interface CommandLineRunner
SpringApplication
に含まれている場合に Bean を実行する必要があることを示すために使用されるインターフェース。複数の CommandLineRunner
Bean を同じアプリケーションコンテキスト内で定義でき、Ordered
インターフェースまたは @Order
アノテーションを使用してオーダーできます。 生の文字列配列の代わりに ApplicationArguments
にアクセスする必要がある場合は、ApplicationRunner
の使用を検討してください。
ApplicationRunner
修飾子と型 | メソッドと説明 |
---|---|
void | run(StringSE... args) Bean の実行に使用されるコールバック。 |
void run(StringSE... args) throws ExceptionSE
args
- 受信メインメソッド引数 ExceptionSE
- エラー時 Copyright © 2019 Pivotal Software, Inc.. All rights reserved.