Skip to content

Commit

Permalink
Polish "Remove old documentation relating to yaml and profiles"
Browse files Browse the repository at this point in the history
  • Loading branch information
mbhave committed Feb 17, 2021
1 parent 93f822e commit 52a1564
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -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:
Expand Down Expand Up @@ -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 "`<<boot-features-external-config-typesafe-configuration-properties>>`" 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]]
Expand Down

0 comments on commit 52a1564

Please sign in to comment.