SpringBoot是如何实现自动装配的?
首先,SpringBoot的核心注解@SpringBootApplication里面包含了三个注解,@SpringBootConfiguration@EnableAutoConfiguration@ComponentScan,其中@EnableAutoConfiguration是实现自动装配的注解,如下图所示。

@EnableAutoConfiguration里面Import了一个自动装载类(AutoConfigurationImportSelector)

自动装配类内部读取了该项目引用的Jar包的classpath路径下META-INF/spring.factories文件中的配置类。
最后根据读到配置类中的@ConditionOnClass判断是否有对应的class文件, 如果有的话就加载这个类,把这个配置类的所有Bean放入Spring容器内使用。








![【Hadoop】- MapReduce YARN的部署[8]](https://img-blog.csdnimg.cn/direct/2db7663582ac4a1fa825037da60fc7d6.png)

![【Hadoop】- MapReduce YARN 初体验[9]](https://img-blog.csdnimg.cn/direct/f09935e8bade4d16a28d0d5ce9f9e616.png)








