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
  • 解析父类
相关推荐
椰椰椰耶2 小时前
【Spring】拦截器详解
java·后端·spring
笑衬人心。9 小时前
Spring的`@Value`注解使用详细说明
java·后端·spring
即将进化成人机11 小时前
Spring-----MVC配置和基本原理
java·spring·mvc
老神在在00111 小时前
SpringMVC2
java·前端·学习·spring·java-ee
老神在在00111 小时前
SpringMVC3
java·前端·学习·spring·java-ee
勤匠13 小时前
spring shell 基础使用
java·linux·spring
Code季风14 小时前
测试驱动开发(TDD)实战:在 Spring 框架实现中践行 “红 - 绿 - 重构“ 循环
java·驱动开发·后端·spring·设计模式·springboot·tdd
想要成为祖国的花朵14 小时前
Java_Springboot技术框架讲解部分(二)
java·开发语言·spring boot·spring
iam_leeqing15 小时前
Lambda表达式
java·spring
JouJz16 小时前
设计模式之代理模式:掌控对象访问的优雅之道
java·spring·设计模式·系统安全·代理模式