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

spring-issuemaster opened this issue May 25, 2018 · 0 comments


Copy link

@spring-issuemaster spring-issuemaster 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:

  • #20002 Introduce API to select application listeners
  • #21508 Resolved ApplicationListener event type should get cached
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.