public class EventPublishingRunListener extends Object implements SpringApplicationRunListener, org.springframework.core.Ordered
SpringApplicationRunListener to publish SpringApplicationEvents.
 
 Uses an internal ApplicationEventMulticaster for the events that are fired
 before the context is actually refreshed.
| Constructor and Description | 
|---|
| EventPublishingRunListener(SpringApplication application,
                          String[] args) | 
| 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  ApplicationContexthas 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
  ApplicationContexthas been created. | 
| void | failed(org.springframework.context.ConfigurableApplicationContext context,
      Throwable exception)Called when a failure occurs when running the application. | 
| int | getOrder() | 
| void | running(org.springframework.context.ConfigurableApplicationContext context)Called immediately before the run method finishes, when the application context has
 been refreshed and all  CommandLineRunnersandApplicationRunnershave been called. | 
| void | started(org.springframework.context.ConfigurableApplicationContext context)The context has been refreshed and the application has started but
  CommandLineRunnersandApplicationRunnershave not been called. | 
| void | starting()Called immediately when the run method has first started. | 
public EventPublishingRunListener(SpringApplication application, String[] args)
public int getOrder()
getOrder in interface org.springframework.core.Orderedpublic void starting()
SpringApplicationRunListenerstarting in interface SpringApplicationRunListenerpublic void environmentPrepared(org.springframework.core.env.ConfigurableEnvironment environment)
SpringApplicationRunListenerApplicationContext has been created.environmentPrepared in interface SpringApplicationRunListenerenvironment - the environmentpublic void contextPrepared(org.springframework.context.ConfigurableApplicationContext context)
SpringApplicationRunListenerApplicationContext has been created and prepared, but
 before sources have been loaded.contextPrepared in interface SpringApplicationRunListenercontext - the application contextpublic void contextLoaded(org.springframework.context.ConfigurableApplicationContext context)
SpringApplicationRunListenercontextLoaded in interface SpringApplicationRunListenercontext - the application contextpublic void started(org.springframework.context.ConfigurableApplicationContext context)
SpringApplicationRunListenerCommandLineRunners and ApplicationRunners have not been called.started in interface SpringApplicationRunListenercontext - the application context.public void running(org.springframework.context.ConfigurableApplicationContext context)
SpringApplicationRunListenerCommandLineRunners and
 ApplicationRunners have been called.running in interface SpringApplicationRunListenercontext - the application context.public void failed(org.springframework.context.ConfigurableApplicationContext context,
                   Throwable exception)
SpringApplicationRunListenerfailed in interface SpringApplicationRunListenercontext - the application context or null if a failure occurred before
 the context was createdexception - the failureCopyright © 2020 Pivotal Software, Inc.. All rights reserved.