@@ -470,7 +470,11 @@ property (typically OS env, system property or command line argument).
470
470
471
471
If `spring.config.location` contains directories (as opposed to files) they should end
472
472
in `/` (and will be appended with the names generated from `spring.config.name` before
473
- being loaded). The default search path `classpath:,classpath:/config,file:,file:config/`
473
+ being loaded, including profile-specific file names). Files specified in
474
+ `spring.config.location` are used as-is, with no support for profile-specific variants,
475
+ and will be overridden by any profile-specific properties.
476
+
477
+ The default search path `classpath:,classpath:/config,file:,file:config/`
474
478
is always used, irrespective of the value of `spring.config.location`. This search path
475
479
is ordered from lowest to highest precedence (`file:config/` wins). If you do specify
476
480
your own locations, they take precedence over all of the default locations and use the
@@ -506,6 +510,10 @@ If several profiles are specified, a last wins strategy applies. For example, pr
506
510
specified by the `spring.profiles.active` property are added after those configured via
507
511
the `SpringApplication` API and therefore take precedence.
508
512
513
+ NOTE: If you have specified any files in `spring.config.location`, profile-specific
514
+ variants of those files will not be considered. Use directories in`spring.config.location`
515
+ if you also want to also use profile-specific properties.
516
+
509
517
510
518
511
519
[[boot-features-external-config-placeholders-in-properties]]
0 commit comments