这句话可以作为理解springboot自动注入的原理的钥匙:ImportSelector接口的selectImports返回的数组(类的全类名)都会被纳入到spring容器中. 至于spring怎么根据类名创建bean的就不用管了.博文地址https://www.jianshu.com/p/464d04c36fb1 public class AutoConfigurationImportSelector implements DeferredImportSelector, BeanClassLo