当前位置:网站首页>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()
边栏推荐
- 724. Find the central subscript of the array
- KMP匹配字符串
- Trie number dictionary tree
- 总线的基本概念
- flink1.13 sql基础语法(二)join操作
- VB.net 简单的处理图片,黑白(类库——7)
- 光模块字母含义及参数简称大全
- 2022g2 power station boiler stoker special operation certificate examination question bank and answers
- [MySQL practice of massive data with high concurrency, high performance and high availability -8] - transaction isolation mechanism of InnoDB
- Trie数-字典树
猜你喜欢
随机推荐
LC weekly 300
What is MQ?
拓扑排序和关键路径的图形化显示
[paper summary] zero shot semantic segmentation
Unity is connected to the weather system
力扣(LeetCode)184. 部门工资最高的员工(2022.07.03)
Flink1.13 basic SQL syntax (II) join operation
Zzulioj:1201: mode problem
c语言经典指针和数组笔试题解析
小程序毕业设计---美食、菜谱小程序
[matlab] general function of communication signal modulation - generation of narrow-band Gaussian white noise
模拟小根堆
Introduction To AMBA 简单理解
Supplement the JS of a video website to decrypt the video
tutle时钟改进版
TCP state transition diagram
ping端口神器psping
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
企业级日志分析系统ELK(如果事与愿违那一定另有安排)
19. Framebuffer application programming