public class DeferredApplicationEventPublisher extends Object implements org.springframework.context.ApplicationEventPublisher, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
ApplicationEventPublisher to resolve
publishEvent(ApplicationEvent) too early to publish ApplicationEvent
when Spring
ApplicationContexts' ApplicationEventMulticaster is not ready, thus current class will
hold all early events temporary until
Spring ApplicationContext is active,
and then those events will be replayed.| 构造器和说明 |
|---|
DeferredApplicationEventPublisher(org.springframework.context.ConfigurableApplicationContext context) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event) |
void |
publishEvent(org.springframework.context.ApplicationEvent event) |
void |
publishEvent(Object event) |
public DeferredApplicationEventPublisher(org.springframework.context.ConfigurableApplicationContext context)
public void publishEvent(org.springframework.context.ApplicationEvent event)
publishEvent 在接口中 org.springframework.context.ApplicationEventPublisherpublic void publishEvent(Object event)
public void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
onApplicationEvent 在接口中 org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>Copyright © 2021. All rights reserved.