Commit 594c8910 authored by Stephane Nicoll's avatar Stephane Nicoll

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
parent 2a8a3741
/* /*
* Copyright 2012-2015 the original author or authors. * Copyright 2012-2016 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -86,7 +86,8 @@ public @interface ConfigurationProperties { ...@@ -86,7 +86,8 @@ public @interface ConfigurationProperties {
/** /**
* Optionally provide explicit resource locations to bind to. By default the * Optionally provide explicit resource locations to bind to. By default the
* configuration at these specified locations will be merged with the default * configuration at these specified locations will be merged with the default
* configuration. * configuration. These resources take precedence over any other property sources
* 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()
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment