Skip to content

Commit

Permalink
Add note about using @eventlistener on lazy beans
Browse files Browse the repository at this point in the history
Closes gh-34057
  • Loading branch information
snicoll committed Dec 12, 2024
1 parent ea8b18f commit 2c32601
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,8 @@ Kotlin::
----
======

NOTE: Do not define such beans to be lazy as the `ApplicationContext` will honour that and will not register the method to listen to events.

The method signature once again declares the event type to which it listens,
but, this time, with a flexible name and without implementing a specific listener interface.
The event type can also be narrowed through generics as long as the actual event type
Expand Down

0 comments on commit 2c32601

Please sign in to comment.