1、随机数的占位符
${random.value}、${random.int}、${random.long}
${random.int(10)}、${random.int[1024,65536]}
2、占位符获取之前配置的值,如果没有可以是用:指定默认值
person:
lastName: 张三${random.uuid}
age: ${random.int}
boss: false
birth: 2017/12/12
maps: {k1: v1,k2: 12}
lists:
- lisi
- zhaoliu
dog:
name: ${person.hello:hello}_dog
上:5 | SpringBoot中@PropertySource、@ImportResource和@Bean三个注解的作用
下:7 | SpringBoot之Profile多环境支持