购买
下载掌阅APP,畅读海量书库
立即打开
畅读海量书库
扫码下载掌阅APP

2.4 SpringApplicationRunListeners分析

本节将对SpringApplicationRunListeners进行分析,该对象主要的成员变量有以下两个:

(1)成员变量listeners用于存储SpringApplicationRunListener集合;

(2)applicationStartup。

在SpringApplicationRunListeners中提供了多个方法,这些方法都会对应一个事件,关于方法和事件的对应关系见表2-4。

表2-4 方法和事件的对应关系

在SpringApplicationRunListeners中所提供的方法都依赖于Spring Event(Spring事件),关于Spring Event的相关内容本节不做分析。 qQsfRLsF9OAFqvBxsKJGQyW1Ft8tQQuuYqu3PWUYkKxCAulu4Vk1BL6uhpGOHSwS

点击中间区域
呼出菜单
上一章
目录
下一章
×