Browse Source

Revise contribution

See gh-34747
pull/35405/head
Sam Brannen 8 months ago
parent
commit
d0966dfb58
  1. 16
      spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java

16
spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java

@ -144,8 +144,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<>();
@ -285,11 +287,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, the BeanNameAware,BeanFactoryAware,BeanClassLoaderAware interface are 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) {

Loading…
Cancel
Save