springboot 自动配置
2021-04-06 22:14:39 0 举报
登录查看完整内容
springboot 自动配置
作者其他创作
大纲/内容
@SpringBootApplication@Target({ElementType.TYPE})@Retention(RetentionPolicy.RUNTIME)@Documented@Inherited@SpringBootConfiguration@EnableAutoConfiguration
EventListener
@SpringBootConfiguration@Target({ElementType.TYPE})@Retention(RetentionPolicy.RUNTIME)@Documented@Configuration
deferredImportSelector.getAutoConfigurationEntry(annotationMetadata)
返回一个实现了DeferredImportSelector.Group接口的类:AutoConfigurationImportSelector.AutoConfigurationGroup
@EnableAutoConfiguration@Target({ElementType.TYPE})@Retention(RetentionPolicy.RUNTIME)@Documented@Inherited@AutoConfigurationPackage@Import({AutoConfigurationImportSelector.class})
直接调用AutoConfigurationImportSelector.selectImports()
是否实现getImportGroup()
loadSpringFactories(classLoaderToUse)会扫描classpath跟所有jar包下:MET-INF/spring.factories文件,读取当中的配置,并存入缓存中
YES
span style=\"font-size: inherit;\
NO
AutoConfigurationImportSelector implements DeferredImportSelector
0 条评论
回复 删除
下一页