From 9a2ad6d42dd215bc2b73066176c31dcd756d88dd Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Thu, 28 Jul 2022 10:43:48 +0100 Subject: [PATCH] Remove references to ConfigFileApplicationListener Update documentation and meta-data to remove referenced to the now deprecated `ConfigFileApplicationListener` class. Closes gh-31895 --- .../asciidoc/howto/properties-and-configuration.adoc | 4 +--- .../CloudFoundryVcapEnvironmentPostProcessor.java | 2 +- .../additional-spring-configuration-metadata.json | 11 ++++++----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/properties-and-configuration.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/properties-and-configuration.adoc index d05c5f85234f..28e5c8249b4e 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/properties-and-configuration.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/properties-and-configuration.adoc @@ -154,9 +154,7 @@ You can also provide the following System properties (or environment variables) No matter what you set in the environment, Spring Boot always loads `application.properties` as described above. By default, if YAML is used, then files with the '`.yml`' extension are also added to the list. -Spring Boot logs the configuration files that are loaded at the `DEBUG` level and the candidates it has not found at `TRACE` level. - -See {spring-boot-module-code}/context/config/ConfigFileApplicationListener.java[`ConfigFileApplicationListener`] for more detail. +TIP: If you want detailed information about the files that are being loaded you can <> of `org.springframework.boot.context.config` to `trace`. diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/cloud/CloudFoundryVcapEnvironmentPostProcessor.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/cloud/CloudFoundryVcapEnvironmentPostProcessor.java index c5ca91ebb0de..cc14092cd8ad 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/cloud/CloudFoundryVcapEnvironmentPostProcessor.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/cloud/CloudFoundryVcapEnvironmentPostProcessor.java @@ -96,7 +96,7 @@ public class CloudFoundryVcapEnvironmentPostProcessor implements EnvironmentPost private final Log logger; - // Before ConfigFileApplicationListener so values there can use these + // Before ConfigDataEnvironmentPostProcessor so values there can use these private int order = ConfigDataEnvironmentPostProcessor.ORDER - 1; /** diff --git a/spring-boot-project/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json index c660d2cf3986..f26593c76b29 100644 --- a/spring-boot-project/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-boot-project/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -293,7 +293,7 @@ { "name": "spring.config.additional-location", "type": "java.lang.String", - "sourceType": "org.springframework.boot.context.config.ConfigFileApplicationListener", + "sourceType": "org.springframework.boot.context.config.ConfigDataEnvironment", "description": "Config file locations used in addition to the defaults." }, { @@ -305,13 +305,13 @@ { "name": "spring.config.location", "type": "java.lang.String", - "sourceType": "org.springframework.boot.context.config.ConfigFileApplicationListener", + "sourceType": "org.springframework.boot.context.config.ConfigDataEnvironment", "description": "Config file locations that replace the defaults." }, { "name": "spring.config.name", "type": "java.lang.String", - "sourceType": "org.springframework.boot.context.config.ConfigFileApplicationListener", + "sourceType": "org.springframework.boot.context.config.StandardConfigDataLocationResolver", "description": "Config file name.", "defaultValue": "application" }, @@ -910,7 +910,7 @@ { "name": "spring.profiles", "type": "java.util.List", - "sourceType": "org.springframework.boot.context.config.ConfigFileApplicationListener", + "sourceType": "org.springframework.boot.context.config.Profiles", "description": "Comma-separated list of profile expressions that at least one should match for the document to be included.", "deprecation": { "replacement": "spring.config.activate.on-profile", @@ -920,12 +920,13 @@ { "name": "spring.profiles.active", "type": "java.util.List", - "sourceType": "org.springframework.boot.context.config.ConfigFileApplicationListener", + "sourceType": "org.springframework.boot.context.config.Profiles", "description": "Comma-separated list of active profiles. Can be overridden by a command line switch." }, { "name": "spring.profiles.default", "type": "java.lang.String", + "sourceType": "org.springframework.boot.context.config.Profiles", "description": "Name of the profile to enable if no profile is active.", "defaultValue": "default" },