-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Description
Robert Macaulay opened SPR-3033 and commented
In org.springframework.beans.factory.support.AbstractBeanFactory, the method containsBean(String) is called from BeanDefinitionValueResolver.resolveValueIfNecessary, line 116 in 2.0.2.
Was wondering if a scope could be added the the <idref/> to make determination to either call containsBean or containsLocalBean on the beanFactory.
The reason this would be of use would be in BeanNameAutoProxyCreators. We had a case where the beanname idref was a bean defined in the parent application context. Therefore, it was not being proxied by the BeanNameAutoProxyCreator in the child app context, but it wasn't failing since the bean name did in fact exist in the parent.
This would be just an additional security level above idrefs to ensure that there would be no accidental attempts to autoproxy things in the wrong contexts. As far as I could find, there is no mechanism to re-autoproxy in a child context a bean that is included from a parent.
Affects: 2.0.2
Issue Links:
- Evaluate 'idref' element and 'local' attribute in Spring 3.1 [SPR-8179] #12830 Evaluate 'idref' element and 'local' attribute in Spring 3.1