specified excluded names matched against unprefixed FactoryBean names as well (SPR-5926)

This commit is contained in:
Juergen Hoeller 2009-09-20 22:22:35 +00:00
parent 9f75eb4f44
commit 566eeba8ca
1 changed files with 4 additions and 1 deletions

View File

@ -904,7 +904,10 @@ public class MBeanExporter extends MBeanRegistrationSupport
* Indicates whether or not a particular bean name is present in the excluded beans list.
*/
private boolean isExcluded(String beanName) {
return (this.excludedBeans != null && this.excludedBeans.contains(beanName));
return (this.excludedBeans != null &&
(this.excludedBeans.contains(beanName) ||
(beanName.startsWith(BeanFactory.FACTORY_BEAN_PREFIX) &&
this.excludedBeans.contains(beanName.substring(BeanFactory.FACTORY_BEAN_PREFIX.length())))));
}