public interface SpringApplicationRunParticipant
SpringApplication
run
method is called. Participants are loaded via the
SpringFactoriesLoader
and should declare a public constructor that accepts a
SpringApplication
instance and a String[]
of arguments. A new
SpringApplicationRunParticipant
instance will be created for each run.Modifier and Type | Method and Description |
---|---|
void |
contextLoaded(ConfigurableApplicationContext context)
Called once the application context has been loaded but before it has been
refreshed.
|
void |
contextPrepared(ConfigurableApplicationContext context)
Called once the
ApplicationContext has been created and prepared, but
before sources have been loaded. |
void |
environmentPrepared(ConfigurableEnvironment environment)
Called once the environment has been prepared, but before the
ApplicationContext has been created. |
void |
finished(ConfigurableApplicationContext context,
Throwable exception)
Called immediately before the run method finishes.
|
void |
started()
Called immediately when the run method has first started.
|
void started()
void environmentPrepared(ConfigurableEnvironment environment)
ApplicationContext
has been created.environment
- the environmentvoid contextPrepared(ConfigurableApplicationContext context)
ApplicationContext
has been created and prepared, but
before sources have been loaded.context
- the application contextvoid contextLoaded(ConfigurableApplicationContext context)
context
- the application contextvoid finished(ConfigurableApplicationContext context, Throwable exception)
context
- the application contextexception
- any run exception or null if run completed successfully.Copyright © 2014. All rights reserved.