Skip to content

Add @EventListener value() support for event class literals [SPR-13156] #17747

@spring-projects-issues

Description

@spring-projects-issues

Bob Tiernay opened SPR-13156 and commented

This allows to have the event parameter as optional if it is unused:

@EventListener(ApplicationReadyEvent.class)
public void start() {
  // ...
}

and also allow for multiple:

@EventListener({ApplicationStartEvent.class, ApplicationReadyEvent.class})
public void start() {
  // ...
}

Affects: 4.2 RC1

Referenced from: commits bf786c3

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