我的 application.yml 文件如下。如何将其转换为 application.properties 我正在尝试,但如何在同一个文件中写入多个属性。它给了我重复的 kery 错误。
---
spring:
profiles: peer1
eureka:
instance:
hostname: peer1
client:
serviceUrl:
defaultZone: http://peer2/eureka/
---
spring:
profiles: peer2
eureka:
instance:
hostname: peer2
client:
serviceUrl:
defaultZone: http://peer1/eureka/
原文由 Sudhanshu Saini 发布,翻译遵循 CC BY-SA 4.0 许可协议
IntelliJ 和其他 IDE 提供了相同的插件。
例如- https://plugins.jetbrains.com/plugin/13804-convert-yaml-and-properties-file
安装插件,右键单击您的 yaml 或属性文件并选择 - “ 转换 yaml 和属性文件”。