Skip to content

Support @Order on ApplicationListeners [SPR-12410] #17018

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

Closed
spring-projects-issues opened this issue Nov 3, 2014 · 1 comment
Closed

Support @Order on ApplicationListeners [SPR-12410] #17018

spring-projects-issues opened this issue Nov 3, 2014 · 1 comment
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 Nov 3, 2014

Sam Brannen opened SPR-12410 and commented

Status Quo

AbstractApplicationEventMulticaster currently sorts ApplicationListener instances based on the Ordered interface, but the sorting algorithm does not honor annotations.

At the time of this writing, there are two invocations of OrderComparator.sort() within AbstractApplicationEventMulticaster.

Proposal

Refactor AbstractApplicationEventMulticaster to use AnnotationAwareOrderComparator.sort() instead of OrderComparator.sort().


Affects: 3.0 GA

Issue Links:

Referenced from: commits 8eb7bee

@spring-projects-issues
Copy link
Collaborator Author

Stéphane Nicoll commented

ApplicationListener implementations can now be ordered either using @Order or by implementing the Ordered interface.

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