摘要: 可以从以下位置加载配置文件,优先级由高到低 Config locations are searched in reverse order. By default, the configured locations are classpath:/,classpath:/config/,file:./, 阅读全文
posted @ 2022-08-08 16:52 z-laoyao 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 自动配置真正实现是从classpath中搜寻所有的META-INF/spring.factories配置文件 ,并将其中对应的 org.springframework.boot.autoconfigure. 包下的配置项,通过反射实例化为对应标注了 @Configuration的JavaConfig 阅读全文
posted @ 2022-08-08 16:17 z-laoyao 阅读(19) 评论(0) 推荐(0) 编辑