跳至主要內容
Spring及SpringBoot开发扩展点
Spring及SpringBoot开发扩展点
Spring及SpringBoot开发扩展点

ResourceLoader

资源加载器

BeanDefinitionReader

Bean定义信息读取者


GuoCay原创...小于 1 分钟JavaSpringSpring Boot开发笔记
Spring框架refresh()执行流程
Spring框架refresh函数执行流程
Spring框架refresh函数执行流程

prepareRefresh(): 准备刷新

  • 设置启动时间
  • 容器关闭标示符设置为false
  • 容器可用标示符设置为true
  • initPropertySources(): 钩子函数, 初始化属性资源,
  • getEnvironment().validateRequiredProperties(): 验证必要属性必须存在.
  • 清空已有的监听器(如果有的话),并重新从applicationListeners属性中加载

GuoCay原创...大约 4 分钟JavaSpring开发笔记