SpringBoot启动原理1
2025-03-04 13:51:45 0 举报
@SpringBootApplication注解
作者其他创作
大纲/内容
@Import(AutoConfigurationImportSelector.class)
@SpringBootConfiguration
@ComponentScan
@Configutation
@SpringBootApplication
扫描当前包及其子包中的bean
创建SpringbootApplication对象
@EnableAutoConfiguration
1、selectImports2、getAutoConfigurationEntry3、getCandidateConfigurations4、SpringFactoriesLoader.loadFactoryNames读取spring-boot-autoconfigure.jar中META-INF/spring.factories中的org.springframework.boot.autoconfigure配置项,注册到容器中

收藏
0 条评论
下一页