1. 在启动类@SpringBootApplication组合注解里有@EnableAutoConfiguration(开启自动配置)注解![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/94683a53cda1407a840aa819ba968181.png)
2.@EnableAutoConfiguration组合注解有一个@Import({AutoConfigurationImportSelector.class})(用来扫描bean配置文件的类)![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/288094876b3140c78e0ed5d67121eeea.png)
3.进入此类我们可以看到getCandidateConfigurations方法,大概意思是它会从 META-INF/spring.factories文件中读取自动配置类(就是要自动注入bean的全类名,下图有此文件的主要内容)