|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2020 the original author or authors. |
| 2 | + * Copyright 2002-2023 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
106 | 106 | *
|
107 | 107 | * <h3>A note on property overriding with {@code @PropertySource}</h3>
|
108 | 108 | *
|
109 |
| - * <p>In cases where a given property key exists in more than one {@code .properties} |
| 109 | + * <p>In cases where a given property key exists in more than one property resource |
110 | 110 | * file, the last {@code @PropertySource} annotation processed will 'win' and override
|
111 | 111 | * any previous key with the same name.
|
112 | 112 | *
|
|
182 | 182 | String name() default "";
|
183 | 183 |
|
184 | 184 | /**
|
185 |
| - * Indicate the resource location(s) of the properties file to be loaded. |
186 |
| - * <p>Both traditional and XML-based properties file formats are supported |
187 |
| - * — for example, {@code "classpath:/com/myco/app.properties"} |
188 |
| - * or {@code "file:/path/to/file.xml"}. |
| 185 | + * Indicate the resource locations of the properties files to be loaded. |
| 186 | + * <p>The default {@link #factory() factory} supports both traditional and |
| 187 | + * XML-based properties file formats — for example, |
| 188 | + * {@code "classpath:/com/myco/app.properties"} or {@code "file:/path/to/file.xml"}. |
189 | 189 | * <p>Resource location wildcards (e.g. **/*.properties) are not permitted;
|
190 |
| - * each location must evaluate to exactly one {@code .properties} or {@code .xml} |
191 |
| - * resource. |
192 |
| - * <p>${...} placeholders will be resolved against any/all property sources already |
| 190 | + * each location must evaluate to exactly one resource. |
| 191 | + * <p>${...} placeholders will be resolved against property sources already |
193 | 192 | * registered with the {@code Environment}. See {@linkplain PropertySource above}
|
194 | 193 | * for examples.
|
195 | 194 | * <p>Each location will be added to the enclosing {@code Environment} as its own
|
|
214 | 213 |
|
215 | 214 | /**
|
216 | 215 | * Specify a custom {@link PropertySourceFactory}, if any.
|
217 |
| - * <p>By default, a default factory for standard resource files will be used. |
| 216 | + * <p>By default, a default factory for standard resource files will be used |
| 217 | + * which supports {@code *.properties} and {@code *.xml} file formats for |
| 218 | + * {@link java.util.Properties}. |
218 | 219 | * @since 4.3
|
219 | 220 | * @see org.springframework.core.io.support.DefaultPropertySourceFactory
|
220 | 221 | * @see org.springframework.core.io.support.ResourcePropertySource
|
|
0 commit comments