From 6509310fdbf052c0bb181ce07af1029a5feed622 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Wed, 16 Sep 2020 22:57:29 -0700 Subject: [PATCH] Fix DefaultPropertiesPropertySource package tangle Relocate `DefaultPropertiesPropertySource` to fix a package tangle. Closes gh-23383 --- .../test/context/ConfigDataApplicationContextInitializer.java | 2 +- .../boot/{env => }/DefaultPropertiesPropertySource.java | 2 +- .../main/java/org/springframework/boot/SpringApplication.java | 1 - .../boot/context/config/ConfigDataEnvironment.java | 2 +- .../boot/context/config/ConfigFileApplicationListener.java | 2 +- .../boot/{env => }/DefaultPropertiesPropertySourceTests.java | 2 +- 6 files changed, 5 insertions(+), 6 deletions(-) rename spring-boot-project/spring-boot/src/main/java/org/springframework/boot/{env => }/DefaultPropertiesPropertySource.java (98%) rename spring-boot-project/spring-boot/src/test/java/org/springframework/boot/{env => }/DefaultPropertiesPropertySourceTests.java (99%) diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/ConfigDataApplicationContextInitializer.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/ConfigDataApplicationContextInitializer.java index 9b39ad1190..935cd6f1ca 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/ConfigDataApplicationContextInitializer.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/ConfigDataApplicationContextInitializer.java @@ -16,10 +16,10 @@ package org.springframework.boot.test.context; +import org.springframework.boot.DefaultPropertiesPropertySource; import org.springframework.boot.context.config.ConfigData; import org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor; import org.springframework.boot.env.DefaultBootstrapRegisty; -import org.springframework.boot.env.DefaultPropertiesPropertySource; import org.springframework.boot.env.RandomValuePropertySource; import org.springframework.context.ApplicationContextInitializer; import org.springframework.context.ConfigurableApplicationContext; diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/env/DefaultPropertiesPropertySource.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/DefaultPropertiesPropertySource.java similarity index 98% rename from spring-boot-project/spring-boot/src/main/java/org/springframework/boot/env/DefaultPropertiesPropertySource.java rename to spring-boot-project/spring-boot/src/main/java/org/springframework/boot/DefaultPropertiesPropertySource.java index 3dba8c2f55..b5be872bf4 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/env/DefaultPropertiesPropertySource.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/DefaultPropertiesPropertySource.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.env; +package org.springframework.boot; import java.util.Map; import java.util.function.Consumer; diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java index 908d10ac3b..f9462f36ea 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java @@ -46,7 +46,6 @@ import org.springframework.boot.context.properties.bind.Bindable; import org.springframework.boot.context.properties.bind.Binder; import org.springframework.boot.context.properties.source.ConfigurationPropertySources; import org.springframework.boot.convert.ApplicationConversionService; -import org.springframework.boot.env.DefaultPropertiesPropertySource; import org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext; import org.springframework.boot.web.reactive.context.StandardReactiveWebEnvironment; import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext; diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataEnvironment.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataEnvironment.java index ea2cb12fed..2daf112d9f 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataEnvironment.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataEnvironment.java @@ -25,6 +25,7 @@ import java.util.Set; import org.apache.commons.logging.Log; +import org.springframework.boot.DefaultPropertiesPropertySource; import org.springframework.boot.context.config.ConfigDataEnvironmentContributors.BinderOption; import org.springframework.boot.context.properties.bind.BindException; import org.springframework.boot.context.properties.bind.Bindable; @@ -33,7 +34,6 @@ import org.springframework.boot.context.properties.bind.PlaceholdersResolver; import org.springframework.boot.context.properties.source.ConfigurationPropertyName; import org.springframework.boot.context.properties.source.ConfigurationPropertySource; import org.springframework.boot.env.BootstrapRegistry; -import org.springframework.boot.env.DefaultPropertiesPropertySource; import org.springframework.boot.logging.DeferredLogFactory; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.Environment; diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java index eac7244bcc..52cf90550f 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java @@ -42,6 +42,7 @@ import org.apache.commons.logging.Log; import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.BeanFactoryPostProcessor; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; +import org.springframework.boot.DefaultPropertiesPropertySource; import org.springframework.boot.SpringApplication; import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent; import org.springframework.boot.context.event.ApplicationPreparedEvent; @@ -49,7 +50,6 @@ import org.springframework.boot.context.properties.bind.Bindable; import org.springframework.boot.context.properties.bind.Binder; import org.springframework.boot.context.properties.bind.PropertySourcesPlaceholdersResolver; import org.springframework.boot.context.properties.source.ConfigurationPropertySources; -import org.springframework.boot.env.DefaultPropertiesPropertySource; import org.springframework.boot.env.EnvironmentPostProcessor; import org.springframework.boot.env.PropertySourceLoader; import org.springframework.boot.env.RandomValuePropertySource; diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/DefaultPropertiesPropertySourceTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/DefaultPropertiesPropertySourceTests.java similarity index 99% rename from spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/DefaultPropertiesPropertySourceTests.java rename to spring-boot-project/spring-boot/src/test/java/org/springframework/boot/DefaultPropertiesPropertySourceTests.java index 96d890ce0b..ad43f3e5c9 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/DefaultPropertiesPropertySourceTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/DefaultPropertiesPropertySourceTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.env; +package org.springframework.boot; import java.util.Collections; import java.util.function.Consumer;