If a non-null object is returned by this method, the bean creation process will be short-circuited. The only further processing applied is the {@link #postProcessAfterInitialization} callback from the configured{@link BeanPostProcessor BeanPostProcessors}.
This callback will only be applied to bean definitions with a bean class. In particular, it will not be applied to beans with a "factory-method".
Post-processors may implement the extended {@link SmartInstantiationAwareBeanPostProcessor} interface in orderto predict the type of the bean object that they are going to return here.
@param beanClass the class of the bean to be instantiated
@param beanName the name of the bean
@return the bean object to expose instead of a default instance of the target bean,or null
to proceed with default instantiation
@throws org.springframework.beans.BeansException in case of errors
@see org.springframework.beans.factory.support.AbstractBeanDefinition#hasBeanClass
@see org.springframework.beans.factory.support.AbstractBeanDefinition#getFactoryMethodName
|
|