首页 > 其他分享 >【Spring】核心知识点梳理

【Spring】核心知识点梳理

时间:2023-03-24 20:56:21浏览次数:35  
标签:知识点 ApplicationListener Spring EventListener 监听 事件 梳理

 

 

事件:

  发送事件   ApplicationEventPublisher::publishEvent(ApplicationEvent event)

  监听事件方法注解:@EventListener

  监听服务启停接口 ApplicationListener

 

public interface ApplicationListener<E extends ApplicationEvent> extends EventListener {
  void onApplicationEvent(E paramE);
},

  常用事件:if (applicationEvent instanceof ContextClosedEvent) {

  

 

标签:知识点,ApplicationListener,Spring,EventListener,监听,事件,梳理
From: https://www.cnblogs.com/clarino/p/17253300.html

相关文章