Annotation-based event listener does not receive event published in @PostConstruct [SPR-15122] #19689
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: declined
A suggestion or change that we don't feel we should currently apply
type: enhancement
A general enhancement
František Hartman opened SPR-15122 and commented
Annotation-based event listener does not receive event published in
@PostConstruct
, while old style interface based listener does.See example project at https://github.com/frant-hartm/spring-application-events
One event is published in
@PostConstruct
method of another bean. Another event is published from main method after context is initialised. Interface based listener sees both events, annotation based sees only the second one:Interface based sees event: MyEvent{value='from postConstruct'}
Annotation based sees event: MyEvent{value='from main'}
Interface based sees event: MyEvent{value='from main'}
Affects: 4.3.5
Reference URL: https://github.com/frant-hartm/spring-application-events
Issue Links:
The text was updated successfully, but these errors were encountered: