public abstract class OnceApplicationContextEventListener extends Object implements org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
ApplicationListener for ApplicationEvent guarantees just one-time execution
and prevents the event propagation in the hierarchical ApplicationContexts| 限定符 | 构造器和说明 |
|---|---|
protected |
OnceApplicationContextEventListener() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
onApplicationEvent(org.springframework.context.ApplicationEvent event) |
protected void |
onContextClosedEvent(org.springframework.context.event.ContextClosedEvent event)
The subclass overrides this method to handle
ContextClosedEvent |
protected void |
onContextRefreshedEvent(org.springframework.context.event.ContextRefreshedEvent event)
The subclass overrides this method to handle
ContextRefreshedEvent |
protected void |
onContextStartedEvent(org.springframework.context.event.ContextStartedEvent event)
The subclass overrides this method to handle
ContextStartedEvent |
protected void |
onContextStoppedEvent(org.springframework.context.event.ContextStoppedEvent event)
The subclass overrides this method to handle
ContextStoppedEvent |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
onApplicationEvent 在接口中 org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>protected void onContextRefreshedEvent(org.springframework.context.event.ContextRefreshedEvent event)
ContextRefreshedEventevent - ContextRefreshedEventprotected void onContextStartedEvent(org.springframework.context.event.ContextStartedEvent event)
ContextStartedEventevent - ContextStartedEventprotected void onContextStoppedEvent(org.springframework.context.event.ContextStoppedEvent event)
ContextStoppedEventevent - ContextStoppedEventprotected void onContextClosedEvent(org.springframework.context.event.ContextClosedEvent event)
ContextClosedEventevent - ContextClosedEventpublic final void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
setApplicationContext 在接口中 org.springframework.context.ApplicationContextAwareCopyright © 2025. All rights reserved.