|
|
|
@ -89,7 +89,7 @@ public class PropertiesBeanDefinitionReader extends AbstractBeanDefinitionReader |
|
|
|
public static final String SEPARATOR = "."; |
|
|
|
public static final String SEPARATOR = "."; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Special key to distinguish {@code owner.(class)=com.myapp.MyClass}- |
|
|
|
* Special key to distinguish {@code owner.(class)=com.myapp.MyClass}. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static final String CLASS_KEY = "(class)"; |
|
|
|
public static final String CLASS_KEY = "(class)"; |
|
|
|
|
|
|
|
|
|
|
|
@ -299,10 +299,10 @@ public class PropertiesBeanDefinitionReader extends AbstractBeanDefinitionReader |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Register bean definitions contained in a Map, |
|
|
|
* Register bean definitions contained in a Map, using all property keys (i.e. not |
|
|
|
* using all property keys (i.e. not filtering by prefix). |
|
|
|
* filtering by prefix). |
|
|
|
* @param map Map: name -> property (String or Object). Property values |
|
|
|
* @param map a map of {@code name} to {@code property} (String or Object). Property |
|
|
|
* will be strings if coming from a Properties file etc. Property names |
|
|
|
* values will be strings if coming from a Properties file etc. Property names |
|
|
|
* (keys) <b>must</b> be Strings. Class keys must be Strings. |
|
|
|
* (keys) <b>must</b> be Strings. Class keys must be Strings. |
|
|
|
* @return the number of bean definitions found |
|
|
|
* @return the number of bean definitions found |
|
|
|
* @throws BeansException in case of loading or parsing errors |
|
|
|
* @throws BeansException in case of loading or parsing errors |
|
|
|
@ -315,8 +315,8 @@ public class PropertiesBeanDefinitionReader extends AbstractBeanDefinitionReader |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Register bean definitions contained in a Map. |
|
|
|
* Register bean definitions contained in a Map. |
|
|
|
* Ignore ineligible properties. |
|
|
|
* Ignore ineligible properties. |
|
|
|
* @param map Map name -> property (String or Object). Property values |
|
|
|
* @param map a map of {@code name} to {@code property} (String or Object). Property |
|
|
|
* will be strings if coming from a Properties file etc. Property names |
|
|
|
* values will be strings if coming from a Properties file etc. Property names |
|
|
|
* (keys) <b>must</b> be Strings. Class keys must be Strings. |
|
|
|
* (keys) <b>must</b> be Strings. Class keys must be Strings. |
|
|
|
* @param prefix a filter within the keys in the map: e.g. 'beans.' |
|
|
|
* @param prefix a filter within the keys in the map: e.g. 'beans.' |
|
|
|
* (can be empty or {@code null}) |
|
|
|
* (can be empty or {@code null}) |
|
|
|
@ -330,9 +330,9 @@ public class PropertiesBeanDefinitionReader extends AbstractBeanDefinitionReader |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Register bean definitions contained in a Map. |
|
|
|
* Register bean definitions contained in a Map. |
|
|
|
* Ignore ineligible properties. |
|
|
|
* Ignore ineligible properties. |
|
|
|
* @param map Map name -> property (String or Object). Property values |
|
|
|
* @param map a map of {@code name} to {@code property} (String or Object). Property |
|
|
|
* will be strings if coming from a Properties file etc. Property names |
|
|
|
* values will be strings if coming from a Properties file etc. Property names |
|
|
|
* (keys) <b>must</b> be strings. Class keys must be Strings. |
|
|
|
* (keys) <b>must</b> be Strings. Class keys must be Strings. |
|
|
|
* @param prefix a filter within the keys in the map: e.g. 'beans.' |
|
|
|
* @param prefix a filter within the keys in the map: e.g. 'beans.' |
|
|
|
* (can be empty or {@code null}) |
|
|
|
* (can be empty or {@code null}) |
|
|
|
* @param resourceDescription description of the resource that the |
|
|
|
* @param resourceDescription description of the resource that the |
|
|
|
@ -392,9 +392,9 @@ public class PropertiesBeanDefinitionReader extends AbstractBeanDefinitionReader |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Get all property values, given a prefix (which will be stripped) |
|
|
|
* Get all property values, given a prefix (which will be stripped) |
|
|
|
* and add the bean they define to the factory with the given name |
|
|
|
* and add the bean they define to the factory with the given name. |
|
|
|
* @param beanName name of the bean to define |
|
|
|
* @param beanName name of the bean to define |
|
|
|
* @param map Map containing string pairs |
|
|
|
* @param map a Map containing string pairs |
|
|
|
* @param prefix prefix of each entry, which will be stripped |
|
|
|
* @param prefix prefix of each entry, which will be stripped |
|
|
|
* @param resourceDescription description of the resource that the |
|
|
|
* @param resourceDescription description of the resource that the |
|
|
|
* Map came from (for logging purposes) |
|
|
|
* Map came from (for logging purposes) |
|
|
|
@ -501,7 +501,7 @@ public class PropertiesBeanDefinitionReader extends AbstractBeanDefinitionReader |
|
|
|
* Reads the value of the entry. Correctly interprets bean references for |
|
|
|
* Reads the value of the entry. Correctly interprets bean references for |
|
|
|
* values that are prefixed with an asterisk. |
|
|
|
* values that are prefixed with an asterisk. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private Object readValue(Map.Entry<? ,?> entry) { |
|
|
|
private Object readValue(Map.Entry<?, ?> entry) { |
|
|
|
Object val = entry.getValue(); |
|
|
|
Object val = entry.getValue(); |
|
|
|
if (val instanceof String) { |
|
|
|
if (val instanceof String) { |
|
|
|
String strVal = (String) val; |
|
|
|
String strVal = (String) val; |
|
|
|
|