public class EventPublishingRunParticipant extends Object implements SpringApplicationRunParticipant
SpringApplicationRunParticipant
to publish SpringApplicationEvent
s.Constructor and Description |
---|
EventPublishingRunParticipant(SpringApplication application,
String[] args) |
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.
|
public EventPublishingRunParticipant(SpringApplication application, String[] args)
public void started()
SpringApplicationRunParticipant
started
in interface SpringApplicationRunParticipant
public void environmentPrepared(ConfigurableEnvironment environment)
SpringApplicationRunParticipant
ApplicationContext
has been created.environmentPrepared
in interface SpringApplicationRunParticipant
environment
- the environmentpublic void contextPrepared(ConfigurableApplicationContext context)
SpringApplicationRunParticipant
ApplicationContext
has been created and prepared, but
before sources have been loaded.contextPrepared
in interface SpringApplicationRunParticipant
context
- the application contextpublic void contextLoaded(ConfigurableApplicationContext context)
SpringApplicationRunParticipant
contextLoaded
in interface SpringApplicationRunParticipant
context
- the application contextpublic void finished(ConfigurableApplicationContext context, Throwable exception)
SpringApplicationRunParticipant
finished
in interface SpringApplicationRunParticipant
context
- the application contextexception
- any run exception or null if run completed successfully.Copyright © 2014. All rights reserved.