07-ConfigurationClassPostProces的解析

文章目录

如何解析@Component,@Service,@Configurationd,@Bean,@Import等注解

1. 源码描述

BeanFactoryPostProcessor used for bootstrapping processing of @Configuration classes.

Registered by default when using context:annotation-config/ or context:component-scan/. Otherwise, may be declared manually as with any other BeanFactoryPostProcessor.

This post processor is priority-ordered as it is important that any Bean methods declared in @Configuration classes have their corresponding bean definitions registered before any other BeanFactoryPostProcessor executes.

主要是来解析@Configuration注解的类,比其他BeanFactoryPostProcessor优先执行。

2. 类继承结构图

3. 解析流程

4. 具体的注解解析

  • 递归处理成员嵌套类
  • @PropertySource
  • @ComponentScan
  • @Import
  • @ImportSource
  • @Bean
  • 解析父类
相关推荐
小菜yh2 小时前
关于Redis
java·数据库·spring boot·redis·spring·缓存
爱上语文4 小时前
Springboot的三层架构
java·开发语言·spring boot·后端·spring
荆州克莱4 小时前
springcloud整合nacos、sentinal、springcloud-gateway,springboot security、oauth2总结
spring boot·spring·spring cloud·css3·技术
拾光师11 小时前
spring获取当前request
java·后端·spring
xujinwei_gingko11 小时前
Spring IOC容器Bean对象管理-Java Config方式
java·spring
Xua305512 小时前
浅谈Spring Cloud:认识微服务
spring·spring cloud·微服务
JOJO___14 小时前
Spring IoC 配置类 总结
java·后端·spring·java-ee
黄昏_15 小时前
苍穹外卖Day01-2
java·spring
亚林瓜子15 小时前
Jackson注解屏蔽某些字段读取权限
spring·json·jackson