From 52a15647a910b1e148be12205a795577b8e70215 Mon Sep 17 00:00:00 2001 From: Madhura Bhave Date: Wed, 17 Feb 2021 09:41:41 -0800 Subject: [PATCH] Polish "Remove old documentation relating to yaml and profiles" See gh-24620 --- .../src/docs/asciidoc/spring-boot-features.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc index ffba35182203..90a9b71abffa 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc @@ -984,9 +984,6 @@ The `SpringApplication` class automatically supports YAML as an alternative to p NOTE: If you use "`Starters`", SnakeYAML is automatically provided by `spring-boot-starter`. -WARNING: YAML files cannot be loaded by using the `@PropertySource` or `@TestPropertySource` annotations. -So, in the case that you need to load values that way, you need to use a properties file. - ==== Mapping YAML to Properties YAML documents need to be converted from their hierarchical format to a flat structure that can be used with the Spring `Environment`. For example, consider the following YAML document: @@ -1035,6 +1032,9 @@ The preceding example would be transformed into these properties: TIP: Properties that use the `[index]` notation can be bound to Java `List` or `Set` objects using Spring Boot's `Binder` class. For more details see the "`<>`" section below. +WARNING: YAML files cannot be loaded by using the `@PropertySource` or `@TestPropertySource` annotations. +So, in the case that you need to load values that way, you need to use a properties file. + [[boot-features-external-config-loading-yaml]]