首页 > 解决方案 > spring application yaml中如何维护rootKey和childKey的多个值?

问题描述

我需要根据输入键从 application.yml 中提取消息。我使用以下方法在 STS 中看到编译错误。非常感谢这里的任何帮助。

parentKey: parent
   childKey1: child1
      grandChildKey1: grandChild11
      grandChildKey2: grandChild12
   childKey2: child2
      grandChildKey2: grandChild21

标签: javaspringspring-bootyaml

解决方案


推荐阅读