|
1 | 1 | /* |
2 | | - * Copyright 2002-2013 the original author or authors. |
| 2 | + * Copyright 2002-2015 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. |
|
35 | 35 | import org.springframework.util.StringValueResolver; |
36 | 36 |
|
37 | 37 | /** |
38 | | - * Specialization of {@link org.springframework.beans.factory.config.PlaceholderConfigurerSupport |
39 | | - * PlaceholderConfigurerSupport} that resolves ${...} placeholders within bean definition |
40 | | - * property values and {@code @Value} annotations against the current Spring {@link |
41 | | - * Environment} and its set of {@link PropertySources}. |
| 38 | + * Specialization of {@link PlaceholderConfigurerSupport} that resolves ${...} placeholders |
| 39 | + * within bean definition property values and {@code @Value} annotations against the current |
| 40 | + * Spring {@link Environment} and its set of {@link PropertySources}. |
42 | 41 | * |
43 | | - * <p>This class is designed as a general replacement for {@code |
44 | | - * PropertyPlaceholderConfigurer} in Spring 3.1 applications. It is used by default to |
45 | | - * support the {@code property-placeholder} element in working against the |
46 | | - * spring-context-3.1 XSD, whereas spring-context versions <= 3.0 default to |
47 | | - * {@code PropertyPlaceholderConfigurer} to ensure backward compatibility. See |
48 | | - * spring-context XSD documentation for complete details. |
| 42 | + * <p>This class is designed as a general replacement for {@code PropertyPlaceholderConfigurer} |
| 43 | + * in Spring 3.1 applications. It is used by default to support the {@code property-placeholder} |
| 44 | + * element in working against the spring-context-3.1 XSD, whereas spring-context versions |
| 45 | + * <= 3.0 default to {@code PropertyPlaceholderConfigurer} to ensure backward compatibility. |
| 46 | + * See the spring-context XSD documentation for complete details. |
49 | 47 | * |
50 | | - * <p>Any local properties (e.g. those added via {@link #setProperties}, |
51 | | - * {@link #setLocations} et al.) are added as a {@code PropertySource}. Search precedence |
52 | | - * of local properties is based on the value of the {@link #setLocalOverride localOverride} |
53 | | - * property, which is by default {@code false} meaning that local properties are to be |
54 | | - * searched last, after all environment property sources. |
| 48 | + * <p>Any local properties (e.g. those added via {@link #setProperties}, {@link #setLocations} |
| 49 | + * et al.) are added as a {@code PropertySource}. Search precedence of local properties is |
| 50 | + * based on the value of the {@link #setLocalOverride localOverride} property, which is by |
| 51 | + * default {@code false} meaning that local properties are to be searched last, after all |
| 52 | + * environment property sources. |
55 | 53 | * |
56 | 54 | * <p>See {@link org.springframework.core.env.ConfigurableEnvironment ConfigurableEnvironment} |
57 | | - * and related Javadoc for details on manipulating environment property sources. |
| 55 | + * and related javadocs for details on manipulating environment property sources. |
58 | 56 | * |
59 | 57 | * @author Chris Beams |
60 | 58 | * @since 3.1 |
61 | 59 | * @see org.springframework.core.env.ConfigurableEnvironment |
62 | 60 | * @see org.springframework.beans.factory.config.PlaceholderConfigurerSupport |
63 | 61 | * @see org.springframework.beans.factory.config.PropertyPlaceholderConfigurer |
64 | 62 | */ |
65 | | -public class PropertySourcesPlaceholderConfigurer extends PlaceholderConfigurerSupport |
66 | | - implements EnvironmentAware { |
| 63 | +public class PropertySourcesPlaceholderConfigurer extends PlaceholderConfigurerSupport implements EnvironmentAware { |
67 | 64 |
|
68 | 65 | /** |
69 | 66 | * {@value} is the name given to the {@link PropertySource} for the set of |
@@ -139,7 +136,7 @@ public String getProperty(String key) { |
139 | 136 | } |
140 | 137 | try { |
141 | 138 | PropertySource<?> localPropertySource = |
142 | | - new PropertiesPropertySource(LOCAL_PROPERTIES_PROPERTY_SOURCE_NAME, mergeProperties()); |
| 139 | + new PropertiesPropertySource(LOCAL_PROPERTIES_PROPERTY_SOURCE_NAME, mergeProperties()); |
143 | 140 | if (this.localOverride) { |
144 | 141 | this.propertySources.addFirst(localPropertySource); |
145 | 142 | } |
|
0 commit comments