Skip to content

Commit 20ed8c2

Browse files
robert-smith-911snicoll
authored andcommitted
Document precedence between properties and yaml
See gh-25300
1 parent 06b2640 commit 20ed8c2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

+2
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,8 @@ 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: If you have both `application.yml` and `application.properties` on the same level, the `application.properties` will take precedence.
526+
525527
To provide a concrete example, suppose you develop a `@Component` that uses a `name` property, as shown in the following example:
526528

527529
[source,java,indent=0]

0 commit comments

Comments
 (0)