|
|
|
@ -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) { |
|
|
|
|