From 9d1cf0cb3230be6e76030ae0850ed660600a8ec7 Mon Sep 17 00:00:00 2001 From: lituizi <2811328244@qq.com> Date: Sun, 13 Apr 2025 11:34:20 +0800 Subject: [PATCH] docs(spring-beans): Update the documentation for the `ignoreDependencyInterface` method in the `AbstractAutowireCapableBeanFactory` class. The updated documentation now indicates that by default, the interfaces ignored are not only `BeanFactoryAware`, but also include `BeanNameAware`, `BeanFactoryAware`, and `BeanClassLoaderAware`. Specifically, the documentation update reflects that: - Initially, it was mentioned that only the `BeanFactoryAware` interface is ignored by default. - The updated documentation now correctly states that `BeanNameAware`, `BeanFactoryAware`, and `BeanClassLoaderAware` interfaces are all ignored by default. This change ensures a more accurate representation of the default behavior regarding which dependency interfaces are automatically ignored during autowiring in the context of Spring's bean factory mechanism. Signed-off-by: lituizi <2811328244@qq.com> --- .../factory/support/AbstractAutowireCapableBeanFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java index 0fcaacd6c1bc..eb9a675fc8d0 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java @@ -285,7 +285,7 @@ public void ignoreDependencyType(Class> type) { *
This will typically be used by application contexts to register * dependencies that are resolved in other ways, like BeanFactory through * BeanFactoryAware or ApplicationContext through ApplicationContextAware. - *
By default, only the BeanFactoryAware interface is ignored. + *
By default, the BeanNameAware,BeanFactoryAware,BeanClassLoaderAware interface are ignored. * For further types to ignore, invoke this method for each type. * @see org.springframework.beans.factory.BeanFactoryAware * @see org.springframework.context.ApplicationContextAware