From be428ef0f28175094ed45beef0231a1e338d1460 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 27 Jul 2020 14:09:54 +0100 Subject: [PATCH] Document the need for configuration files to have a file extension Closes gh-22278 --- .../src/main/asciidoc/spring-boot-features.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 64531d1e97..d5bf5fd785 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -490,6 +490,8 @@ They must be defined as an environment property (typically an OS environment var If `spring.config.location` contains directories (as opposed to files), they should end in `/` (and, at runtime, be appended with the names generated from `spring.config.name` before being loaded, including profile-specific file names). Files specified in `spring.config.location` are used as-is, with no support for profile-specific variants, and are overridden by any profile-specific properties. +Whether specified directly or contained in a directory, configuration files must include a file extension in their name. +Typical extensions that are supported out-of-the-box are `.properties`, `.yaml`, and `.yml`. Config locations are searched in reverse order. By default, the configured locations are `classpath:/,classpath:/config/,file:./,file:./config/`.