Spring Boot 配置读取顺序 apollo 配置读取顺序

1、 本地优先: application 优先于 ,profiles

application.properties 优先于 application-dev.properties

2、apollo Namespace:私有 application 优先于 ,关联公共 properties ,优先于 私有 其他 properties 。

 

3、apollo 默认读取的是: application 和 关联公共 properties , 要读取其他 私有的 properties , 需要使用 @EnableApolloConfig("service-temp") 注解进行指定,否则读取不到配置。

了解更多: 

Apollo 配置中心 多环境配置 Apollo Profiles 配置_HaHa_Sir的博客-CSDN博客_apollo本地配置路径

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐