-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
Oliver Drotbohm opened SPR-16872 and commented
ConfigurableApplicationContext
currently exposes addApplicationListener(…)
which unfortunately isn't usable with lambdas as they don't retain generics information that's used downstream to properly route events to.
It would be cool if there was an overload addApplicationListener(Class<T> type, Consumer<T> consumer)
that internally creates a GenericApplicationListenerAdapter
to carry the type information forward.
Issue Links:
- Introduce API to select application listeners [SPR-15441] #20002 Introduce API to select application listeners
- Resolved ApplicationListener event type should get cached [SPR-16970] #21508 Resolved ApplicationListener event type should get cached
xak2000
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