当前位置:网站首页>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()
边栏推荐
- BUU-Reverse-easyre
- Li Kou's 300th weekly match
- ansys命令
- [matlab] matlab simulation - low pass Gaussian white noise
- Simulated small root pile
- Nodejs learning document
- LM small programmable controller software (based on CoDeSys) note XXI: error 3703
- Void convolution, deformable convolution, deformable ROI pooling
- [QT] create mycombobox click event
- How to use postman to realize simple interface Association [add, delete, modify and query]
猜你喜欢
Signification des lettres du module optique et abréviation des paramètres Daquan
ETCD数据库源码分析——初始化总览
Integer type of C language
光模塊字母含義及參數簡稱大全
补某视频网站的js,进行视频解密
1480. 一维数组的动态和
Two sides of the evening: tell me about the bloom filter and cuckoo filter? Application scenario? I'm confused..
1480. Dynamic sum of one-dimensional array
C语言简易学生管理系统(含源码)
【雕爷学编程】Arduino动手做(105)---压电陶瓷振动模块
随机推荐
Flutter calls Gaode map app to realize location search, route planning and reverse geocoding
总线的基本概念
(4) Canal multi instance use
Automated testing selenium foundation -- webdriverapi
[matlab] matlab simulation modulation system - VSB system
Electronic components mall and data manual download website summary
[matlab] general function of communication signal modulation bandpass filter
RSA加密应用常见缺陷的原理与实践
Trie number dictionary tree
补某视频网站的js,进行视频解密
With the advent of the IP era, how can E-sports hotels take advantage of the "east wind" of games?
[paper summary] zero shot semantic segmentation
Build an Internet of things infrared temperature measuring punch in machine with esp32 / rush to work after the Spring Festival? Baa, no matter how hard you work, you must take your temperature first
Talk about the SQL server version of DTM sub transaction barrier function
2022g2 power station boiler stoker special operation certificate examination question bank and answers
[matlab] general function of communication signal modulation Fourier transform
Flask
2022 a special equipment related management (elevator) examination questions simulation examination platform operation
Topological sorting and graphical display of critical path
远程桌面客户端 RDP