Skip to content

Commit f2f5106

Browse files
committed
Merge pull request #25300 from robert-smith-911
* pr/25300: Polish "Document precedence between properties and yaml" Document precedence between properties and yaml Closes gh-25300
2 parents 06b2640 + 63cca9b commit f2f5106

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc

+3
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,9 @@ Config data files are considered in the following order:
522522
. <<boot-features-external-config-files,Application properties>> outside of your packaged jar (`application.properties` and YAML variants).
523523
. <<boot-features-external-config-files-profile-specific,Profile-specific application properties>> outside of your packaged jar (`application-\{profile}.properties` and YAML variants).
524524

525+
NOTE: It is recommended to stick with one format for your entire application.
526+
If you have configuration files with both `.properties` and `.yml` format in the same location, `.properties` takes precedence.
527+
525528
To provide a concrete example, suppose you develop a `@Component` that uses a `name` property, as shown in the following example:
526529

527530
[source,java,indent=0]

0 commit comments

Comments
 (0)