# yaml
spring:
yaml:
property: value
# properties
spring.yaml.property = value
# yaml 风格
collectionOne: ["a","b","c"]
collectionTwo:
- zengxu
- theday
# properties 风格
collectionOne[0]=a
collectionOne[0]=b
collectionOne[0]=c
collectionTwo[0]=zengxu
collectionTwo[1]=theday
# yaml 风格
map:
key1: value1
key2: value2
mapInMap:
key3: value3
key4: value4
# properties 风格
map.key1=value1
map.key2=value2
map.mapInMap.key3=value3
map.mapInMap.key4=value4
# yaml
pojo:
name: name
desc: desc
pojoList:
- name: zengxu
desc: nextday
- name: zeng
desc: theday
# properties
pojo.name=name
pojo.desc=desc
pojoList[0].name=zengxu
pojoList[0].desc=nextday
pojoList[1].name=zeng
pojoList[1].desc=theday
@Value , ${...} 由 PropertySourcesPlaceholderConfigurer 负责解析
@ConfigurationProperties 由 ConfigurationPropertiesBindingPostProcessor
Relaxed binding