In the Initialization Callbacks section it is mentioned:
We recommend that you do not use the InitializingBean interface, because it unnecessarily couples the code to Spring.
After that there are displayed 2 code examples. The second one uses the InitializingBean callback interface and couples the code to Spring. However, the text mentions "However, the second of the two preceding definitions does not couple the code to Spring." which is wrong. It should say the first of the two...
The same happens in the next section regarding the Destruction Callbacks.
Periklis Ntanasis opened SPR-17453 and commented
There is a minor error in the reference documentation, in the Initialization Callbacks and Destruction Callbacks sections.
In the Initialization Callbacks section it is mentioned:
We recommend that you do not use the InitializingBean interface, because it unnecessarily couples the code to Spring.
After that there are displayed 2 code examples. The second one uses the InitializingBean callback interface and couples the code to Spring. However, the text mentions "However, the second of the two preceding definitions does not couple the code to Spring." which is wrong. It should say the first of the two...
The same happens in the next section regarding the Destruction Callbacks.
Affects: 5.1.2
Reference URL: https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#beans-factory-lifecycle-initializingbean
Referenced from: pull request #2004
The text was updated successfully, but these errors were encountered: