码迷,mamicode.com
首页 > 编程语言 > 详细

spring的9个后置处理器的详细情况

时间:2020-01-22 14:34:06      阅读:608      评论:0      收藏:0      [点我收藏+]

标签:bean   har   nbsp   receive   cto   als   temporary   style   share   

从getSingleton方法开始:

sharedInstance = getSingleton(beanName, new ObjectFactory<Object>() {
                        @Override
                        public Object getObject() throws BeansException {
                            try {
                                return createBean(beanName, mbd, args);
                            }
                            catch (BeansException ex) {
                                // Explicitly remove instance from singleton cache: It might have been put there
                                // eagerly by the creation process, to allow for circular reference resolution.
                                // Also remove any beans that received a temporary reference to the bean.
                                destroySingleton(beanName);
                                throw ex;
                            }
                        }
                    });

其中的createBean方法中就有bean的处理器。

beanPostProcess只是处置处理器,最顶层的接口,相当于一个最基本的后置处理器,会在initializationBean中调用。实际上还有很多后置处理器的更多具体实现。

 

spring的9个后置处理器的详细情况

标签:bean   har   nbsp   receive   cto   als   temporary   style   share   

原文地址:https://www.cnblogs.com/zzq-include/p/12228461.html

(1)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!