From 594c8910c569961f1ea63d77e1156566c6f67d37 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Thu, 11 Feb 2016 14:49:11 +0100 Subject: [PATCH] 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 --- .../boot/context/properties/ConfigurationProperties.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 e740abb1ba..1f00a27ea9 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 @@ -1,5 +1,5 @@ /* - * 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"); * you may not use this file except in compliance with the License. @@ -86,7 +86,8 @@ public @interface ConfigurationProperties { /** * Optionally provide explicit resource locations to bind to. By default the * 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 * @see #merge() */