将 YAML 文件转换为 Application.properties [关闭]

2024-03-06

我们如何将 YAML 文件转换为应用程序属性?

pay.payment:
  sandbox:
   Url: https://securegw-stage//processTransaction
    callbackUrl: http://localhost:8080/pgresponse
    details:
      CHANNEL_ID: '${pay.payment.sandbox.channelid}'
      INDUSTRY_TYPE_ID: '${pay.payment.sandbox.industrytypeid}'
      CALLBACK_URL: '${pay.payment.sandbox.callbackUrl}'

有没有可以在线将 YAML 转换为 app.properties 的工具?


我使用 a 处理了同样的问题蟒蛇脚本 https://github.com/up2code/yaml2props/blob/master/yaml2props.py.

只需克隆并运行:

$ python yaml2props.py {your_path_file}

Note

在 Ubuntu 18.04 上的特定情况下,我必须安装pyperclip库并使用 python3,所以:

$ pip3 install pyperclip
$ python3 yaml2props.py {your_path_file}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

将 YAML 文件转换为 Application.properties [关闭] 的相关文章

随机推荐