Browse Source

Add note about using @EventListener on lazy beans

Closes gh-34057
pull/34398/head
Stéphane Nicoll 1 year ago
parent
commit
2c32601553
  1. 2
      framework-docs/modules/ROOT/pages/core/beans/context-introduction.adoc

2
framework-docs/modules/ROOT/pages/core/beans/context-introduction.adoc

@ -578,6 +578,8 @@ Kotlin:: @@ -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

Loading…
Cancel
Save