24.6 Using YAML instead of Properties

YAML是JSON的一个超集,也是一种方便的定义层次配置数据的格式。只要你将SnakeYAML库放到classpath下,SpringApplication就会自动支持YAML,以作为properties的替换。

如果你使用'Starters',添加spring-boot-starter依赖会自动加载SnakeYAML。

results matching ""

    No results matching ""