public interface SpringApplicationRunListener
SpringApplication run method.
SpringApplicationRunListeners are loaded via 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.| Modifier and Type | Method and Description |
|---|---|
void |
contextLoaded(org.springframework.context.ConfigurableApplicationContext context)
Called once the application context has been loaded but before it has been
refreshed.
|
void |
contextPrepared(org.springframework.context.ConfigurableApplicationContext context)
Called once the
ApplicationContext has been created and prepared, but
before sources have been loaded. |
void |
environmentPrepared(org.springframework.core.env.ConfigurableEnvironment environment)
Called once the environment has been prepared, but before the
ApplicationContext has been created. |
void |
finished(org.springframework.context.ConfigurableApplicationContext context,
Throwable exception)
Called immediately before the run method finishes.
|
void |
starting()
Called immediately when the run method has first started.
|
void starting()
void environmentPrepared(org.springframework.core.env.ConfigurableEnvironment environment)
ApplicationContext has been created.environment - the environmentvoid contextPrepared(org.springframework.context.ConfigurableApplicationContext context)
ApplicationContext has been created and prepared, but
before sources have been loaded.context - the application contextvoid contextLoaded(org.springframework.context.ConfigurableApplicationContext context)
context - the application contextvoid finished(org.springframework.context.ConfigurableApplicationContext context,
Throwable exception)
context - the application context or null if a failure occurred before the
context was createdexception - any run exception or null if run completed successfully.Copyright © 2017 Pivotal Software, Inc.. All rights reserved.