【发布时间】:2017-06-04 19:42:36
【问题描述】:
从云配置服务器提供服务的 Spring Boot 配置文件似乎支持特定于应用程序的属性文件 {application}-{profile}.properties 的连字符,但不支持全局属性文件 application-{profile}.properties
例如在名为“testapp”的应用程序中:
如果配置文件名称是“testprofile”,那么将属性放在 application-testprofile.properties 和 testapp-testprofile.properties 中将起作用。使用端点 /testapp-testprofile.properties 验证
但是,如果配置文件名称为“test-profile”,则 testapp-test-profile.properties 中的属性将起作用,但 application-test-profile.properties 将不起作用。使用端点 /testapp-test-profile.properties 验证
我是否遗漏了什么,或者这是 Spring 云配置服务器处理属性文件的方式中的一个(非常小的)错误/不一致?
使用 Spring Boot 1.5.0.RC1
【问题讨论】:
标签: spring-boot spring-cloud-config