spring-cloud - spring cloud config propertySources“名称”已更改
问题描述
从迁移时
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-server</artifactId>
<version>1.3.4.RELEASE</version>
</dependency>
至
Greenwich.SR2 (aka 2.1.3.RELEASE)
我编写了一个简单的脚本来比较两台服务器返回的配置(在转换之前进行验证)。我的脚本失败了,因为 propertySources“名称”字段发生了变化:
它曾经返回:
"name": "git@my-server:MyOrg/central-config.git/some-application.yml#dev"
但现在返回:
"name": "git@my-server:MyOrg/central-config.git/some-application.yml (document #3)"
IE#dev
现在(document #3)
在调试配置时的价值要低得多。
我知道我可以忽略name
测试中的 ,但为了可用性起见,我想恢复旧格式。
这是设计使然吗?
反正有没有配置这个回来?
更新:
解决方案
合理化多文档配置文件处理(https://github.com/spring-projects/spring-boot/commit/c0d79b92735b46010fb922a214b4cbb20c07fda5)是改变行为的提交。
虽然看起来比我更聪明的人想要进行这种更改,但这似乎与调试配置值的来源相反。我觉得我错过了一些知识。后缀是否(document #0)
真的有一些我不知道的价值?
推荐阅读
- html - SWF:重定向到本地 HTML
- java - 如何将字符串转换为 AltCase?
- javascript - ReactJS - 防止浪费渲染发生
- python - Python BeautifulSoup - 提取文本和属性值
- java - JAVA - 使用 Dijkstra 算法查找 2 个顶点之间的最短路径
- php - 如何在 Laravel 5.6 中为每个菜单使用唯一的 id 并按 id 而不是类突出显示?
- dialogflow-es - diagflow 完成后如何调用外部 REST API?
- php - 无法通过 PHP 导入 PIL
- angular - 产品构建中未显示 Angular HttpClient 查询参数
- c# - 如何将字母存储在数组中并显示它?C#