Update ConfigurationPropertiesBindingPostProcessor with improved logging
when multiple PropertySourcesPlaceholderConfigurer beans are found.
See gh-6457
@ -254,6 +260,8 @@ public class ConfigurationPropertiesBindingPostProcessor
@@ -254,6 +260,8 @@ public class ConfigurationPropertiesBindingPostProcessor
returnnewFlatPropertySources(propertySources);
}
// empty, so not very useful, but fulfils the contract
logger.warn("Unable to obtain PropertySources from "
+"PropertySourcesPlaceholderConfigurer or Environment");
returnnewMutablePropertySources();
}
@ -267,6 +275,11 @@ public class ConfigurationPropertiesBindingPostProcessor
@@ -267,6 +275,11 @@ public class ConfigurationPropertiesBindingPostProcessor
@ -61,6 +62,9 @@ public class ConfigurationPropertiesBindingPostProcessorTests {
@@ -61,6 +62,9 @@ public class ConfigurationPropertiesBindingPostProcessorTests {
@ -336,6 +340,15 @@ public class ConfigurationPropertiesBindingPostProcessorTests {
@@ -336,6 +340,15 @@ public class ConfigurationPropertiesBindingPostProcessorTests {
@ -732,6 +745,22 @@ public class ConfigurationPropertiesBindingPostProcessorTests {
@@ -732,6 +745,22 @@ public class ConfigurationPropertiesBindingPostProcessorTests {