properties和ymal对象与集合的写法

1,YAML

person:
    lastName: hello
    age: 18
    boss: false
    birth: 2017/12/12
    #map集合的写法
    maps: {k1: v1,k2: 12}
    #list的写法,set与list一致
    lists:
      ‐ lisi
      ‐ zhaoliu
    #属性bean写法
    dog:
      name: 小狗
      age: 12

2,properties

person.last‐name=张三${random.uuid}
person.age=${random.int}
person.birth=2017/12/15
person.boss=false
#map写法
person.maps.k1=v1
person.maps.k2=14
#list,set的写法
person.lists=a,b,c
#属性对象的写法
person.dog.name=${person.hello:hello}_dog
person.dog.age=15

猜你喜欢

转载自my.oschina.net/u/3574106/blog/1821504
今日推荐