SpringApplicationRunListener

Listener for the SpringApplicationrun method. SpringApplicationRunListeners are loaded through the SpringFactoriesLoader and should declare a public constructor that accepts a SpringApplication instance and a String[] of arguments. A new SpringApplicationRunListener instance will be created for each run.

Author

Phillip Webb

Dave Syer

Andy Wilkinson

Chris Bono

Since

1.0.0

Functions

Link copied to clipboard
Called once the application context has been loaded but before it has been refreshed.
Link copied to clipboard
Called once the ApplicationContext has been created and prepared, but before sources have been loaded.
Link copied to clipboard
Called once the environment has been prepared, but before the ApplicationContext has been created.
Link copied to clipboard
open fun failed(context: ConfigurableApplicationContext, exception: Throwable)
Called when a failure occurs when running the application.
Link copied to clipboard
open fun ready(context: ConfigurableApplicationContext, timeTaken: Duration)
Called immediately before the run method finishes, when the application context has been refreshed and all CommandLineRunners and ApplicationRunners have been called.
Link copied to clipboard
open fun started(context: ConfigurableApplicationContext, timeTaken: Duration)
The context has been refreshed and the application has started but CommandLineRunners and ApplicationRunners have not been called.
Link copied to clipboard
open fun starting(bootstrapContext: ConfigurableBootstrapContext)
Called immediately when the run method has first started.