FactoryBean that exposes an arbitrary target bean under a different name.
Usually, the target bean will reside in a different bean definition file,
using this FactoryBean to link it in and expose it under a different name.
Effectively, this corresponds to an alias for the target bean.
NOTE: For XML bean definition files, an <alias>
tag is available that effectively achieves the same.
A special capability of this FactoryBean is enabled through its configuration
as bean definition: The "targetBeanName" can be substituted through a placeholder,
in combination with Spring's
PropertyPlaceholderConfigurer .
Thanks to Marcus Bristav for pointing this out!
author: Juergen Hoeller since: 1.2 See Also: BeanReferenceFactoryBean.setTargetBeanName See Also: PropertyPlaceholderConfigurer |