Configure the given raw bean: autowiring bean properties, applying bean property values, applying factory callbacks such as
setBeanName
and
setBeanFactory
, and also applying all bean post processors (including ones which might wrap the given raw bean).
This is effectively a superset of what {@link #initializeBean} provides,fully applying the configuration specified by the corresponding bean definition. Note: This method requires a bean definition for the given name!
@param existingBean the existing bean instance
@param beanName the name of the bean, to be passed to it if necessary(a bean definition of that name has to be available)
@return the bean instance to use, either the original or a wrapped one
@throws org.springframework.beans.factory.NoSuchBeanDefinitionException if there is no bean definition with the given name
@throws BeansException if the initialization failed
@see #initializeBean