【发布时间】:2019-12-18 12:07:07
【问题描述】:
我有一个包含application.yml 的 JAR。该 YAM 文件包含一个数组,例如:
things:
- name: one
color: red
我需要在运行时通过在与 JAR 相同的目录中添加一个额外的 application.yml 文件来调整此数组。但是,我不确定如何 追加 到数组,因为以下配置似乎替换了 JAR 中内置 YAML 文件中的配置:
things:
- name: red
color: blue
最后,在运行时,我需要这个:
things:
- name: one
color: red
- name: two
color: blue
【问题讨论】:
-
你找到解决这个问题的方法了吗?
-
不,我不认为它受支持。
标签: java spring spring-boot yaml