private Collection<ApplicationListener<?>> retrieveApplicationListeners(ResolvableType eventType, Class<?> sourceType, AbstractApplicationEventMulticaster.ListenerRetriever retriever) {
LinkedList allListeners = new LinkedList();
Object beanFactory = this.retrievalMutex;
LinkedHashSet listeners;
LinkedHashSet listenerBeans;
synchronized(this.retrievalMutex) {
listeners = new LinkedHashSet(this.defaultRetriever.applicationListeners);
listenerBeans = new LinkedHashSet(this.defaultRetriever.applicationListenerBeans);
} Iterator beanFactory1 = listeners.iterator(); while(beanFactory1.hasNext()) {
ApplicationListener listener = (ApplicationListener)beanFactory1.next();
if(this.supportsEvent(listener, eventType, sourceType)) {
if(retriever != null) {
retriever.applicationListeners.add(listener);
} allListeners.add(listener);
}
} if(!listenerBeans.isEmpty()) {
BeanFactory beanFactory2 = this.getBeanFactory();
Iterator listener2 = listenerBeans.iterator(); while(listener2.hasNext()) {
String listenerBeanName = (String)listener2.next(); try {
Class listenerType = beanFactory2.getType(listenerBeanName);
if(listenerType == null || this.supportsEvent(listenerType, eventType)) {
ApplicationListener listener1 = (ApplicationListener)beanFactory2.getBean(listenerBeanName, ApplicationListener.class);
if(!allListeners.contains(listener1) && this.supportsEvent(listener1, eventType, sourceType)) {
if(retriever != null) {
retriever.applicationListenerBeans.add(listenerBeanName);
} allListeners.add(listener1);
}
}
} catch (NoSuchBeanDefinitionException var13) {
;
}
}
} AnnotationAwareOrderComparator.sort(allListeners);
return allListeners;
}

org.springframework.context.event.AbstractApplicationEventMulticaster

org.springframework.context.event.AbstractApplicationEventMulticaster的更多相关文章

  1. java.lang.ClassNotFoundException: org.springframework.context.event.GenericApplicationListener ----good

    Caused by: java.lang.NoClassDefFoundError: org/springframework/context/event/GenericApplicationListe ...

  2. 【转】java.lang.ClassNotFoundException: org.springframework.context.event.GenericApplicationListener

    http://www.cnblogs.com/softidea/p/6064091.html Caused by: java.lang.NoClassDefFoundError: org/spring ...

  3. springboot 启动报错"No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available"

    1.问题 springboot启动报错 "D:\Program Files\Java\jdk-11\bin\java.exe" -XX:TieredStopAtLevel=1 -n ...

  4. Context namespace element 'annotation-config' and its parser class [org.springframework.context.annotation.AnnotationConfigBeanDefinitionParser]

    严重: Exception sending context initialized event to listener instance of class org.springframework.we ...

  5. org.springframework.context.ApplicationContextAware使用理解

    一.这个接口有什么用? 当一个类实现了这个接口(ApplicationContextAware)之后,这个类就可以方便获得ApplicationContext中的所有bean.换句话说,就是这个类可以 ...

  6. Mingyang.net:org.springframework.context.annotation.ConflictingBeanDefinitionException

    org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean ...

  7. java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContext

    ***************************错误提示************************************************ SEVERE: A child cont ...

  8. Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContextAware

    1.错误描述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help ...

  9. 关于国际化时报org.springframework.context.NoSuchMessageException错,具体到No message found under code '你的键名' for locale 'zh_CN'.的解决方案

    使用IntelliJ IDEA开发工具解决方案: 总结原因,解决方案: 1,在使用messageSource.getMessage方法时,参数1的键名跟属性文件中键名不一致,比如Controller中 ...

随机推荐

  1. [汇编语言]-第八章 div指令,伪指令dd,dup

    1- div除法指令 (1) 除数: 有8位和16位两种,在一个寄存器或内存单元中. (2) 被除数: 默认放在AX和DX或AX中 除数为8位, 被除数为16位, 默认在AX中存放. 除数为16位, ...

  2. 使用ThinkPHP开发中MySQL性能优化的最佳21条经验

    使用ThinkPHP开发中MySQL性能优化的最佳21条经验讲解,目前,数据库的操作越来越成为整个应用的性能瓶颈了,这点对于Web应用尤其明显.关于数据库的性能,这并不只是DBA才需要担心的事,而这更 ...

  3. python笔记之Cmd模块

    python笔记之Cmd模块 Cmd类型提供了一个创建命令行解析器的框架,默认情况下,它使用readline来进行交互式操作.命令行编辑和命令完成. 使用cmd创建的命令行解释器循环读取输入的所有行并 ...

  4. Digital Roots(hdoj1013)

    Problem Description The digital root of a positive integer is found by summing the digits of the int ...

  5. ASP.NET MVC5+ORACLE 身份认证

    菜鸟来的,刚接触mvc,看到mvc5上默认带有identity身份验证的东西,公司用的oracle数据库,便想着东西能不能支持oracle数据库,折腾了半天弄出下面的东西来,有些东西可能不太准确,望大 ...

  6. ie 6 position fixed

    IE6position:fixed问题解决方案 2013-11-06 18:25:04|  分类: JS/CSS |  标签:ie6  fixed  |举报 |字号大中小订阅     普通写法 #to ...

  7. 点击页面其它地方隐藏该div的两种思路

    思路一 第一种思路分两步 第一步:对document的click事件绑定事件处理程序,使其隐藏该div 第二步:对div的click事件绑定事件处理程序,阻止事件冒泡,防止其冒泡到document,而 ...

  8. lsof查看进程打开了哪些文件目录套接字

    lsof查看进程打开了哪些文件目录套接字

  9. Linux常用C函数---内存控制篇

    函数讲解部分参考http://net.pku.edu.cn/~yhf/linux_c/ calloc(配置内存空间) 相关函数 malloc,free,realloc,brk 表头文件 #includ ...

  10. KMP算法java实现

    /** * 假设现在文本串S匹配到 i 位置,模式串P匹配到 j 位置 如果j = -1,或者当前字符匹配成功(即S[i] == * P[j]),都令i++,j++,继续匹配下一个字符: 如果j != ...