diff --git a/doc/reference/src/objects.xml b/doc/reference/src/objects.xml index 0010affc..0ff2487f 100644 --- a/doc/reference/src/objects.xml +++ b/doc/reference/src/objects.xml @@ -5091,8 +5091,9 @@ joan_age=35 ${joan_age} variables in your object definitions if you configure the following variable source: - <object type="Spring.Objects.Factory.Config.PropertyFileVariableSource, Spring.Core"> - <property name="Location" value="~\application.properties" /> + <object type="Spring.Objects.Factory.Config.PropertyFileVariableSource, Spring.Core"> + <property name="Location" value="~\application.properties" /> <!-- specify a single ... --> + <property name="Locations" value="~\file1.properties,~\file2.properties" /> <!-- or multiple locations --> <property name="IgnoreMissingResources" value="true"/> </object> @@ -5103,12 +5104,22 @@ joan_age=35 the next variable source(s) of the VariablePlaceholderConfigurer. + + Within PropertyFileVariableSources, + precedence rules differ from the configuration of + VariableSources in the + VariablePlaceholderConfigurer. When the same + property occurs more than once in a property file, the value of the + last entry will be used. Same goes for + specifying the same variable in more than one location in a single + PropertyFileVariableSource: the entry from the + last file will be used. <literal>ConfigurableVariableSource</literal> - A ConfigurableVariableSource allows you + A ConfigurableVariableSource allows you to define variables in-line in a variable source definition. To configure the variables ${midge_name} and ${midge_age}, you can use the following