配置文件模块
.properties:目前官方不推荐,建议更换为yaml
语法结构: key=value
.yaml:YamlPropertiesFactoryBean
将yaml加载为Properties,
YamlMapFactoryBean
将yaml加载为Map,对空格要求极为严格
语法结构:key:空格+value
##yaml # 普通的key-value name: tian # 对象 student: name: tian age: 5 #行内写法 student: {name: tian,age: 5} # 数组 pets: - cat - dog - pig pets: [cat,dog,pig] ##.properties 只能保存键值对 name=tian student.name = tian student.age = 5