yaml - YAML 中的索引数组是什么?
问题描述
在我的 yaml spring-boot 应用程序配置中,我有
additional-properties[auto.register.schemas]: false
additional-properties[use.latest.version]: true
它有效!我在 YAML 规范中没有找到这种语法。这是什么意思?如何使用标准 YAML 重写它?这是一样的吗
additional-properties:
- auto.register.schemas: false
- use.latest.version: true
?
解决方案
AFAIK:每个元素(由点分隔)都必须在自己的行上并相应地标记。
foo:
bar:
name: value
name2: value2
fez: value
所以你的例子是:
additional-properties:
auto:
register:
schemas: false
推荐阅读
- jax-rs - JAXRS 相同路径不同的有效负载问题
- google-cloud-platform - 无法通过 terraform 添加“google_compute_network_peering_routes_config”以将私有 SQL 实例连接到我的非私有 VPC 集群
- azure-data-explorer - Kusto 查询计算 2 个指标字段
- android-studio - Mapbox SDK - 在点击事件期间使用 animateCamera 时应用程序崩溃
- xml - 如何从 Summary XML 生成代码覆盖率报告
- python - 如何在 Python 中自动创建编号变量
- bash - external-downloader 选项在 youtube-dl 中未按预期工作
- python - 使用python将一个大的csv文件插入mysql表
- java - 是一种在 Spring Boot application.yml 中为具有默认值的列表定义变量的方法
- java - 在类加载器中隔离 fat jar 依赖项