@yulongsun
2018-08-20T13:19:14.000000Z
字数 752
阅读 740
SpringBoot分析系列
本质就是【工厂加载机制】
1. 通过SpringFactoriesLoader加载META-INF/spring.factories目录中的Properties配置。
2. 通过Spring注解后解析器将加载的组件注册到Spring上下文。
EnableAutoConfiguration
本质是一个@Import注解
AutoConfigurationImportSelector
AutoConfigurationImportSelector是ImportSelector的具体实现。
主要任务是:通过SpringFactoriesLoader加载META-INF/spring.factories目录中的Properties配置。
主要逻辑:
META-INF/spring.factories配置