mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
fixed ApplicationContext event processing for repeated invocations to non-singleton listener beans (SPR-7563)
This commit is contained in:
+1
-1
@@ -238,7 +238,7 @@ public abstract class AbstractApplicationEventMulticaster implements Application
|
||||
BeanFactory beanFactory = getBeanFactory();
|
||||
for (String listenerBeanName : this.applicationListenerBeans) {
|
||||
ApplicationListener listener = beanFactory.getBean(listenerBeanName, ApplicationListener.class);
|
||||
if (!this.preFiltered && !allListeners.contains(listener)) {
|
||||
if (this.preFiltered || !allListeners.contains(listener)) {
|
||||
allListeners.add(listener);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user