spring-refresh-prepareBeanFactory-ApplicationListenerDetector

在spring启动刷新的时候,会有一个准备工作也就是prepareBeanFactory方法,里面会添加BeanPostProcessor,也就是本文要说的ApplicationListenerDetector
prepareBeanFactory(beanFactory);

protected void prepareBeanFactory(ConfigurableListableBeanFactory beanFactory) {
....
beanFactory.addBeanPostProcessor(new ApplicationListenerDetector(this));
....
}

ApplicationListenerDetector属于BeanPostProcessor类型,所以任何bean的实例化,包括spring自带的bean,只要调用doGetBean创建bean

spring-refresh-prepareBeanFactory-ApplicationListenerDetector最先出现在Python成神之路

版权声明:
作者:倾城
链接:https://www.techfm.club/p/25060.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>