类 EventPublishingRunListener
- java.lang.Object
- org.springframework.boot.context.event.EventPublishingRunListener
- 所有已实现的接口:
SpringApplicationRunListener
,org.springframework.core.Ordered
public class EventPublishingRunListener extends Object implements SpringApplicationRunListener, org.springframework.core.Ordered
SpringApplicationRunListener
to publishSpringApplicationEvent
s.Uses an internal
ApplicationEventMulticaster
for the events that are fired before the context is actually refreshed.
构造器概要
构造器 构造器 说明 EventPublishingRunListener(SpringApplication application, String[] args)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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 theApplicationContext
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 theApplicationContext
has been created.void
finished(org.springframework.context.ConfigurableApplicationContext context, Throwable exception)
Called immediately before the run method finishes.int
getOrder()
void
starting()
Called immediately when the run method has first started.
构造器详细资料
EventPublishingRunListener
public EventPublishingRunListener(SpringApplication application, String[] args)
方法详细资料
getOrder
public int getOrder()
- 指定者:
getOrder
在接口中org.springframework.core.Ordered
starting
public void starting()
从接口复制的说明:SpringApplicationRunListener
Called immediately when the run method has first started. Can be used for very early initialization.- 指定者:
starting
在接口中SpringApplicationRunListener
environmentPrepared
public void environmentPrepared(org.springframework.core.env.ConfigurableEnvironment environment)
从接口复制的说明:SpringApplicationRunListener
Called once the environment has been prepared, but before theApplicationContext
has been created.- 指定者:
environmentPrepared
在接口中SpringApplicationRunListener
- 参数:
environment
- the environment
contextPrepared
public void contextPrepared(org.springframework.context.ConfigurableApplicationContext context)
从接口复制的说明:SpringApplicationRunListener
Called once theApplicationContext
has been created and prepared, but before sources have been loaded.- 指定者:
contextPrepared
在接口中SpringApplicationRunListener
- 参数:
context
- the application context
contextLoaded
public void contextLoaded(org.springframework.context.ConfigurableApplicationContext context)
从接口复制的说明:SpringApplicationRunListener
Called once the application context has been loaded but before it has been refreshed.- 指定者:
contextLoaded
在接口中SpringApplicationRunListener
- 参数:
context
- the application context
finished
public void finished(org.springframework.context.ConfigurableApplicationContext context, Throwable exception)
从接口复制的说明:SpringApplicationRunListener
Called immediately before the run method finishes.- 指定者:
finished
在接口中SpringApplicationRunListener
- 参数:
context
- the application context or null if a failure occurred before the context was createdexception
- any run exception or null if run completed successfully.