Deprecate ConfigurationProperties#location

Closes gh-5129
This commit is contained in:
Stephane Nicoll 2016-03-09 17:17:25 +01:00
parent 58e8e10abb
commit b8dc4e74e4
2 changed files with 5 additions and 0 deletions

View File

@ -90,7 +90,9 @@ public @interface ConfigurationProperties {
* defined in the environment. * defined in the environment.
* @return the path (or paths) of resources to bind to * @return the path (or paths) of resources to bind to
* @see #merge() * @see #merge()
* @deprecated configure the environment with those additional locations instead
*/ */
@Deprecated
String[] locations() default {}; String[] locations() default {};
/** /**
@ -98,7 +100,9 @@ public @interface ConfigurationProperties {
* merged with the default configuration. * merged with the default configuration.
* @return the flag value (default true) * @return the flag value (default true)
* @see #locations() * @see #locations()
* @deprecated as {@link #locations()} is deprecated as well
*/ */
@Deprecated
boolean merge() default true; boolean merge() default true;
} }

View File

@ -302,6 +302,7 @@ public class ConfigurationPropertiesBindingPostProcessor
return bean; return bean;
} }
@SuppressWarnings("deprecation")
private void postProcessBeforeInitialization(Object bean, String beanName, private void postProcessBeforeInitialization(Object bean, String beanName,
ConfigurationProperties annotation) { ConfigurationProperties annotation) {
Object target = bean; Object target = bean;