in spring5.3.10 version
A public method is provided in the AbstractBeanDefinitionReader
class,
public final BeanDefinitionRegistry getBeanFactory() {
return this.registry;
}
This method does not have any notes, and the type returned is a BeanDefinitionRegistry
, but the method name is getBeanFactory
. However, BeanDefinitionRegistry
doesn't extends BeanFactory
, so naming it is easy to mislead everyone, getRegistry()
method has been provided,
So I think the getBeanFactory
method should be removed.
Comment From: sbrannen
Good catch, @Mozartaa, and thanks for raising your first issue for the Spring Framework! 👍
I think it's safe to assume that this method was introduced by accident more than 13 years ago (i.e., before we moved to GitHub).
So we'll deprecate that method in 5.3.x
and remove it in 6.0
.