-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Closed
Copy link
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement
Milestone
Description
Affects: 2.4.3
According to the JavaDoc of the ApplicationEventMulticaster
I was expecting to be able to remove and/or add ApplicationListeners at runtime.
This currently does not work for @EventListener
annotated methods, which apparently lead to a ApplicationListenerMethodAdapter
instance at runtime.
Would be great, if we could remove this listener as well, either by
- making the Adapter instance injectable and then remove it with
multicaster.removeApplicationListener()
, or - giving the Adapter instance a well defined bean name and remove it with
multicaster.removeApplicationListenerBean()
I've included a small demo app with a failing test to illustrate what I'm trying to achieve:
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement