ApplicationEvents
' Javadoc talks about using it via an autowired field before it talks about its use as method parameter. While not explicitly stated, this seems to create the impression that ApplicationEvents
is a Spring bean generally eligible for dependency injection. Thus, developers seem to be puzzled to learn that they can not constructor-inject ApplicationEvents
(see the (German) description here).
I think we should direct developers to use ApplicationEvents
as a method parameter primarily as its lifecycle is per-method anyway.