Allow registration of application event listeners in a functional way [SPR-16872] #21411
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Oliver Drotbohm opened SPR-16872 and commented
ConfigurableApplicationContext
currently exposesaddApplicationListener(…)
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 aGenericApplicationListenerAdapter
to carry the type information forward.Issue Links:
The text was updated successfully, but these errors were encountered: