Skip to content

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

Closed
@spring-projects-issues

Description

@spring-projects-issues

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

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions