YAML中的索引数组是什么?
在我的yaml spring启动应用程序配置中YAML中的索引数组是什么?,yaml,Yaml,在我的yaml spring启动应用程序配置中 additional-properties[auto.register.schemas]: false additional-properties[use.latest.version]: true 而且它有效!我在YAML规范中没有找到这种语法。这是什么意思?如何使用标准YAML重新编写?这和我的一样吗 additional-properties: - auto.register.schemas: false - use.lat
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
经过实验和发现后,我得出结论(至少在Spring
application.yaml
):
相当于
camel.component.kafka.additional-properties:
"[auto.register.schemas]": false
"[use.latest.version]": true
camel:
component:
kafka:
additional-properties:
"[auto.register.schemas]": false
"[use.latest.version]": true
这相当于
camel.component.kafka.additional-properties:
"[auto.register.schemas]": false
"[use.latest.version]": true
camel:
component:
kafka:
additional-properties:
"[auto.register.schemas]": false
"[use.latest.version]": true
根据文件,这可能是一个错误。这肯定是YAML所不知道的。你能给出“它是如何工作的”的详细信息吗?这是不正确的,至少对Spring
application.yaml不正确。第二部分也不正确,请参见我的答案。