Skip to content

Commit 594c891

Browse files
committed
Clarify precedence of property sources
When the `locations` attribute is set for a given bean annotated with `@ConfigurationProperties`, the configuration at these specified locations take precedence over any other property sources. This means that such values can't be overridden by a system property or a command line switch for instance. This commit clarifies this rules in the documentation. Closes gh-5111
1 parent 2a8a374 commit 594c891

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2015 the original author or authors.
2+
* Copyright 2012-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -86,7 +86,8 @@
8686
/**
8787
* Optionally provide explicit resource locations to bind to. By default the
8888
* configuration at these specified locations will be merged with the default
89-
* configuration.
89+
* configuration. These resources take precedence over any other property sources
90+
* defined in the environment.
9091
* @return the path (or paths) of resources to bind to
9192
* @see #merge()
9293
*/

0 commit comments

Comments
 (0)