Deprecate getBeanFactory() method in AbstractBeanDefinitionReader

The getBeanFactory() method has been obsolete for more than 13 years
since it was superseded by the getRegistry() method in the
BeanDefinitionReader interface.

Closes gh-27875
This commit is contained in:
Sam Brannen 2022-01-04 12:45:11 +01:00
parent c1606c5a5e
commit f04e9a8366
1 changed files with 3 additions and 0 deletions

View File

@ -107,7 +107,10 @@ public abstract class AbstractBeanDefinitionReader implements BeanDefinitionRead
* Return the bean factory to register the bean definitions with.
* <p>The factory is exposed through the BeanDefinitionRegistry interface,
* encapsulating the methods that are relevant for bean definition handling.
* @deprecated as of Spring Framework 5.3.15 in favor of {@link #getRegistry()},
* to be removed in Spring Framework 6.0
*/
@Deprecated
public final BeanDefinitionRegistry getBeanFactory() {
return this.registry;
}