当前位置:网站首页>BeanFactoryPostProcessor 与 BeanPostProcessor 相关子类概述
BeanFactoryPostProcessor 与 BeanPostProcessor 相关子类概述
2022-07-04 05:16:00 【小刘说】
BeanFactoryPostProcessor
主要用于处理 BeanFactory 和 BeanDefinition
子类概述
类图
BeanDefinitionRegistryPostProcessor
主要针对的操作对象是 BeanDefinitionConfigurableListableBeanFactory
1、解析加了@Configuration
的配置类
2、解析@ComponentScan
扫描的包
3、解析@ComponentScans
扫描的包
4、解析@Import
注解PlaceholderConfigurerSupport
用于解析bean定义中属性值里面的占位符
DeprecatedBeanWarner
检测废弃的bean对象,并记录用户指定的bean类型CustomScopeConfigurer
自定义作用域的配置器EventListenerMethodProcessor
1、解析@EventListener
,获取拦截方法
2、对拦截方法进行转换,变成ApplicationListener
3、将转换的ApplicationListener放到Spring容器中CustomAutowireConfigurer
允许方便地注册自定义autowire限定符类型CustomEditorConfigurer
此类用来方便的注册一个用户自定义的属性编辑器
BeanPostProcessor
在实例化属性注入后或初始化完成后调用
子类概述
类图
ApplicationContextAwareProcessor
向某些实现了Aware的接口的bean设置ApplicationContext中的相应属性ApplicationListenerDetector
此类用来检测bean是否实现了 ApplicationListener 接口,两个作用:
1、实例化完成之后,如果bean的单例的并且属于 ApplicationListener 接口,则加入到多播器中
2、bean销毁之前,如果bean是一个 applicationListener ,则从多播器中提前删除CommonAnnotationBeanPostProcessor
负责解析@Resource
、@WebServiceRef
、@EJB
三个注解AutowiredAnnotationBeanPostProcessor
完成bean中@Autowired
,@Inject
,@Value
注解的解析并注入的功能AbstractAutoProxyCreator
ProxyProcessorSupport 的重要子类。SpringAOP中的核心类。
实现了SmartInstantiationAwareBeanPostProcessor、BeanFactoryAware接口。
自动创建代理对象的类。我们在使用AOP的时候基本上都是用的这个类来进程Bean的拦截,创建代理对象。AbstractAdvisorAutoProxyCreator
AbstractAutoProxyCreator 的子类。SpringAOP中的核心类。用来创建Advisor和代理对象。AspectJAwareAdvisorAutoProxyCreator
AbstractAdvisorAutoProxyCreator 的子类。使用AspectJ语法创建Advisor和代理对象。
其他
02 Spring 源码总结 - invokeBeanFactoryPostProcessors()
04 Spring 源码总结 - registerBeanPostProcessors()
边栏推荐
- LM small programmable controller software (based on CoDeSys) note XXI: error 3703
- Etcd database source code analysis - initialization overview
- left_and_right_net正常版本
- SQL performance optimization skills
- Flask
- Simulink and Arduino serial port communication
- 基于单片机的太阳能杀虫系统
- Zhanrui tankbang | jointly build, cooperate and win-win zhanrui core ecology
- 拓扑排序和关键路径的图形化显示
- Risc-v-qemu-virt in FreeRTOS_ Lock mechanism analysis of GCC
猜你喜欢
Void convolution, deformable convolution, deformable ROI pooling
Analysis of classical pointer and array written test questions in C language
云原生架构实战案例及优化解决方案
BUU-Crypto-[GXYCTF2019]CheckIn
Halcon图片标定,使得后续图片处理过后变成与模板图片一样
Flask
VB.net GIF(制作、拆解——优化代码,类库——5)
Flutter ‘/usr/lib/libswiftCore. dylib‘ (no such file)
2022年A特种设备相关管理(电梯)考试题模拟考试平台操作
Just do it with your hands 7 - * project construction details 2 - hook configuration
随机推荐
National vocational college skills competition (secondary vocational group) network security competition questions - Analysis
PostgreSQL has officially surpassed mysql. Is this guy too strong!
Enterprise level log analysis system elk (if things backfire, there must be other arrangements)
Viewing and using binary log of MySQL
Notepad++ -- display related configurations
[MySQL practice of massive data with high concurrency, high performance and high availability -8] - transaction isolation mechanism of InnoDB
2022G2电站锅炉司炉特种作业证考试题库及答案
Two sides of the evening: tell me about the bloom filter and cuckoo filter? Application scenario? I'm confused..
fastjson
Flutter ‘/usr/lib/libswiftCore. dylib‘ (no such file)
云原生架构实战案例及优化解决方案
如何使用postman实现简单的接口关联【增删改查】
Zhongke Panyun - data analysis and forensics packet flag
1480. 一维数组的动态和
c语言经典指针和数组笔试题解析
BUU-Crypto-[HDCTF2019]basic rsa
[QT] create mycombobox click event
Programming example of stm32f1 and stm32subeide -74hc595 drives 4-bit 7-segment nixie tube
LM small programmable controller software (based on CoDeSys) note XXI: error 3703
BUU-Crypto-[GXYCTF2019]CheckIn