diff --git a/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationProperties.java b/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationProperties.java index 1f00a27ea98..c142d41dda0 100644 --- a/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationProperties.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationProperties.java @@ -90,7 +90,9 @@ public @interface ConfigurationProperties { * defined in the environment. * @return the path (or paths) of resources to bind to * @see #merge() + * @deprecated configure the environment with those additional locations instead */ + @Deprecated String[] locations() default {}; /** @@ -98,7 +100,9 @@ public @interface ConfigurationProperties { * merged with the default configuration. * @return the flag value (default true) * @see #locations() + * @deprecated as {@link #locations()} is deprecated as well */ + @Deprecated boolean merge() default true; } diff --git a/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindingPostProcessor.java b/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindingPostProcessor.java index 3b8f7a318fd..e6b7b4047ab 100644 --- a/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindingPostProcessor.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindingPostProcessor.java @@ -302,6 +302,7 @@ public class ConfigurationPropertiesBindingPostProcessor return bean; } + @SuppressWarnings("deprecation") private void postProcessBeforeInitialization(Object bean, String beanName, ConfigurationProperties annotation) { Object target = bean;