yml文件有帶“-”的表示與轉成properties文件

yml 和properties互轉網站
https://www.toyaml.com/index.html

先看個yml帶“-”的例子

spring:
    user:
    -   id: 123
        name: woniu
    -   id: 456
        name: woniu2

帶“-”表示是數組的首個元素,轉成properties

spring.user[0].id=123
spring.user[0].name=woniu
spring.user[1].id=456
spring.user[1].name=woniu2
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章