Closed rocky-peng closed 4 years ago
纠正MergedBeanDefinitionPostProcessor.postProcessMergedBeanDefinition方法的执行时机的描述
protected Object doCreateBean(final String beanName, final RootBeanDefinition mbd, final Object[] args) { // Instantiate the bean. BeanWrapper instanceWrapper = null; if (mbd.isSingleton()) { instanceWrapper = this.factoryBeanInstanceCache.remove(beanName); } if (instanceWrapper == null) { //createBeanInstance方法已经创建了实例 instanceWrapper = createBeanInstance(beanName, mbd, args); } final Object bean = (instanceWrapper != null ? instanceWrapper.getWrappedInstance() : null); Class<?> beanType = (instanceWrapper != null ? instanceWrapper.getWrappedClass() : null); // Allow post-processors to modify the merged bean definition. synchronized (mbd.postProcessingLock) { if (!mbd.postProcessed) { applyMergedBeanDefinitionPostProcessors(mbd, beanType, beanName); mbd.postProcessed = true; } } }
代码中createBeanInstance方法已经创建了实例
谢谢
纠正MergedBeanDefinitionPostProcessor.postProcessMergedBeanDefinition方法的执行时机的描述
代码中createBeanInstance方法已经创建了实例