Skip to content

Commit b8dc4e7

Browse files
committed
Deprecate ConfigurationProperties#location
Closes gh-5129
1 parent 58e8e10 commit b8dc4e7

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationProperties.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,19 @@
9090
* defined in the environment.
9191
* @return the path (or paths) of resources to bind to
9292
* @see #merge()
93+
* @deprecated configure the environment with those additional locations instead
9394
*/
95+
@Deprecated
9496
String[] locations() default {};
9597

9698
/**
9799
* Flag to indicate that configuration loaded from the specified locations should be
98100
* merged with the default configuration.
99101
* @return the flag value (default true)
100102
* @see #locations()
103+
* @deprecated as {@link #locations()} is deprecated as well
101104
*/
105+
@Deprecated
102106
boolean merge() default true;
103107

104108
}

spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindingPostProcessor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ public Object postProcessAfterInitialization(Object bean, String beanName)
302302
return bean;
303303
}
304304

305+
@SuppressWarnings("deprecation")
305306
private void postProcessBeforeInitialization(Object bean, String beanName,
306307
ConfigurationProperties annotation) {
307308
Object target = bean;

0 commit comments

Comments
 (0)