Add note about using @EventListener on lazy beans

Closes gh-34057
This commit is contained in:
Stéphane Nicoll
2024-12-12 17:32:18 +01:00
parent ea8b18fbc7
commit 2c32601553

View File

@@ -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