public interface BeanNameAware extends Aware
For a list of all bean lifecycle methods, see the
|Modifier and Type||Method and Description|
Set the name of the bean in the bean factory that created this bean.
void setBeanName(String name)
Invoked after population of normal bean properties but before an
init callback such as
or a custom init-method.
name- the name of the bean in the factory. Note that this name is the actual bean name used in the factory, which may differ from the originally specified name: in particular for inner bean names, the actual bean name might have been made unique through appending "#..." suffixes. Use the
BeanFactoryUtils.originalBeanName(String)method to extract the original bean name (without suffix), if desired.