This is because in almost all cases when using @ComponentScan, default annotation config processing (...注解,ComponentScans是多个ComponentScan的组合,开发中很少使用,我们重点分析ComponentScan,this.conditionEvaluator.shouldSkip是解析时检查一些依赖信息...总结
对于SpringBoot应用一般场景下我们可以不使用@ComponentScan,因为@SpringBootApplication注解中包含了@ComponentScan:
@Target...里边的属性配置,比如includeFilters和excludeFilters,我们还需要配合@ComponentScan一起使用。...熟悉@ComponentScan工作原理后,我们可以在很多特殊场景做一些自定义扫描和注册,在实际开发中能够提高不少开发效率。