Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow registration of application event listeners in a functional way [SPR-16872] #21411

Closed
spring-projects-issues opened this issue May 25, 2018 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented May 25, 2018

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants