Skip to content

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

Closed

Description

@spring-projects-issues

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:

Activity

  1. added
    type: enhancement
    in: core
    on Jan 11, 2019
  2. self-assigned this
    on Jan 3, 2024
  3. added a commit that references this issue on Jan 3, 2024
    fba1dc5
  4. modified the milestones: 6.x Backlog, 6.1.3 on Jan 3, 2024
  5. added a commit that references this issue on Jan 26, 2024
    bf3a478
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: coretype: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions