标签:one nbsp cat 遍历 frame 调用 png src .com
1 通过SpringApplication发布事件
2 springboot交给 SimpleApplicationEventMulticaster进行处理
2.1会从缓存中寻找该事件的监听者。其中cachekey是由事件和sourceType确定的类似于这样 "ListenerCacheKey [eventType = org.springframework.boot.context.event.ApplicationReadyEvent, sourceType = class org.springframework.boot.SpringApplication]"
补充:springboot会在发布事件的时候,遍历所有的listener,然后将监听本事件的listener缓存起来,后面再次发布该事件的时候可以从缓存中取
2.2 将监听该事件的listner缓存起来。
3 循环调用监听者相关接口,完成事件通知
学习springboot事件监听源码,如有不对请大家多多指教
标签:one nbsp cat 遍历 frame 调用 png src .com
原文地址:https://www.cnblogs.com/dachengcheng/p/9957144.html