Affects: v5.2.5.RELEASE

In https://github.com/spring-projects/spring-framework/issues/14668, the comment described clearly that the Spring framework is only responsible for managing the lifecycle of the FactoryBean, not the lifecycle of the beans that created by the FactoryBean.

However, this description doesn't appear in the javadoc of FactoryBean. I think it would be great to mention the following points in the documentation:

  1. The Spring framework is only responsible for managing the lifecycle of the FactoryBean, not the lifecycle of the beans that created by the FactoryBean.
  2. Therefore, the Closeable.close() method on the created beans will not be called.
  3. FactoryBean should implement DisposableBean and delegate the Closeable.close() calls to the underlying beans.