二、Spring源码分析——基本注解

一、核心注解

注:@Indexed 需要引入依赖
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context-indexer</artifactId>
    <optional>true</optional>
</dependency>

 

二、核心组件接口

基础接口

  • Resource+ResourceLoader
  • BeanFactory
  • BeanDefinition
  • BeanDefinitionReader
  • BeanDefinitionRegistry
  • ApplicationContext Aware

生命周期-后置处理器

  • BeanFactoryPostProcessor
  • InitializingBean
  • BeanPostProcessor

1、Bean生命周期流程

2、bean初始化流程

3、容器刷新流程

 

三、SpringBoot启动原理

1、Springdoot.rvn会创建一个ioc容器,AnnotationCorigServletWebServerApplicationContext

2、 ioc容器启动onRefresh会启动Tomcat

3、Tomcat启动会加截所有的Servlet

4、DispatcherServlet会加载九大组件的整个初始化流程

posted @   幻月hah  阅读(113)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
点击右上角即可分享
微信分享提示