原理解析
Profile功能
Application-profile功能
-
- 默认配置文件 application.yaml ;任何时候都会加载
- 指定环境配置文件 application-(env).yaml
- 激活指定环境,环境文件激活 命令行激活 修改配置文件的任意值命令行优先
- 默认配置与环境配置同时生效
- 同名配置项,profile配置优先
@profile条件装配功能
Profile条件装配功能
Profile分组
外部化配置
- 外部配置器
- 配置文件查找位置
- 配置文件加载顺序
- 指定环境优先,外部优先,后面的可以覆盖前面的同名配置项
自定义starter
- starter启动原理
- 自定义starter
Springboot原理
Spring原理【spring注解】、springmvc原理、自动配置原理
- springboot启动过程 创建springapplication 运行springapplication (创建上下文 springapplicationrunlistener 遍历springapplicationrunlistener调用starting方法 准备ioc容器的基本信息 刷新ioc容器 调用所有的runners 遍历所有run方法 )
- application events and listeners
- applicationrunner 与 commandlinerunner