Merge branch '6.2.x'

This commit is contained in:
Sam Brannen
2025-04-14 14:16:31 +02:00

View File

@@ -143,8 +143,10 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
private final Set<Class<?>> ignoredDependencyTypes = new HashSet<>(); private final Set<Class<?>> ignoredDependencyTypes = new HashSet<>();
/** /**
* Dependency interfaces to ignore on dependency check and autowire, as Set of * Dependency interfaces to ignore on dependency check and autowire, as a Set
* Class objects. By default, only the BeanFactory interface is ignored. * of Class objects.
* <p>By default, the {@code BeanNameAware}, {@code BeanFactoryAware}, and
* {@code BeanClassLoaderAware} interfaces are ignored.
*/ */
private final Set<Class<?>> ignoredDependencyInterfaces = new HashSet<>(); private final Set<Class<?>> ignoredDependencyInterfaces = new HashSet<>();
@@ -283,11 +285,15 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
/** /**
* Ignore the given dependency interface for autowiring. * Ignore the given dependency interface for autowiring.
* <p>This will typically be used by application contexts to register * <p>This will typically be used by application contexts to register
* dependencies that are resolved in other ways, like BeanFactory through * dependencies that are resolved in other ways, like {@code BeanFactory}
* BeanFactoryAware or ApplicationContext through ApplicationContextAware. * through {@code BeanFactoryAware} or {@code ApplicationContext} through
* <p>By default, only the BeanFactoryAware interface is ignored. * {@code ApplicationContextAware}.
* <p>By default, the {@code BeanNameAware}, {@code BeanFactoryAware}, and
* {@code BeanClassLoaderAware} interfaces are ignored.
* For further types to ignore, invoke this method for each type. * For further types to ignore, invoke this method for each type.
* @see org.springframework.beans.factory.BeanNameAware
* @see org.springframework.beans.factory.BeanFactoryAware * @see org.springframework.beans.factory.BeanFactoryAware
* @see org.springframework.beans.factory.BeanClassLoaderAware
* @see org.springframework.context.ApplicationContextAware * @see org.springframework.context.ApplicationContextAware
*/ */
public void ignoreDependencyInterface(Class<?> ifc) { public void ignoreDependencyInterface(Class<?> ifc) {