application.properties语法:
例:
# properties 只能保存键值对
name=xiaogou
student.name=xiaobai
student.age=18
application.yaml语法:
例:
# yaml是官方推荐配置文件写法 key-value
#对空格要求十分高
#普通的k v键值对
name: xiaohong
#对象
student:
name: xiaohong
age: 18
#对象行内写法
student1: {name: xianghong,age: 18}
#数组
pets:
-cat
-dog
-pig
pets1: [cat,dog,pig]