将 application.yml 文件转换为 application.properties

新手上路,请多包涵

我的 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 许可协议

阅读 848
1 个回答
推荐问题