当前位置:网站首页>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()
边栏推荐
猜你喜欢

Introduction To AMBA 简单理解

Flutter ‘/usr/lib/libswiftCore. dylib‘ (no such file)

Analysis of classical pointer and array written test questions in C language

Solar insect killing system based on single chip microcomputer
![[MySQL practice of massive data with high concurrency, high performance and high availability -8] - transaction isolation mechanism of InnoDB](/img/8e/90d08d22a2d340242be2357f662ea4.jpg)
[MySQL practice of massive data with high concurrency, high performance and high availability -8] - transaction isolation mechanism of InnoDB
![[技术发展-25]:广播电视网、互联网、电信网、电网四网融合技术](/img/87/e0469e280365ed0261e2b551ebd888.png)
[技术发展-25]:广播电视网、互联网、电信网、电网四网融合技术

KMP匹配字符串

June 2022 summary

Trie数-字典树

数据标注是一块肥肉,盯上这块肉的不止中国丨曼孚科技
随机推荐
[paper summary] zero shot semantic segmentation
c语言经典指针和数组笔试题解析
Supplement the JS of a video website to decrypt the video
tutle时钟改进版
BUU-Crypto-Cipher
简易零钱通
Zhongke Panyun - data analysis and forensics packet flag
[matlab] matlab simulation modulation system FM system
724. Find the central subscript of the array
C language simple student management system (including source code)
VB. Net simple processing pictures, black and white (class library - 7)
Solar insect killing system based on single chip microcomputer
XII Golang others
补某视频网站的js,进行视频解密
Flink1.13 SQL basic syntax (I) DDL, DML
Yyds dry goods inventory TCP & UDP
ping端口神器psping
ansys命令
Character types of C language
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