spring-framework / org.springframework.beans.factory.support / PropertiesBeanDefinitionReader / registerBeanDefinitions

registerBeanDefinitions

open fun registerBeanDefinitions(rb: ResourceBundle): Int

Register bean definitions contained in a resource bundle, using all property keys (i.e. not filtering by prefix).

Parameters

rb - the ResourceBundle to load from

Exceptions

BeanDefinitionStoreException - in case of loading or parsing errors

Return
the number of bean definitions found

See Also
#registerBeanDefinitions(java.util.ResourceBundle, String)

open fun registerBeanDefinitions(rb: ResourceBundle, @Nullable prefix: String): Int

Register bean definitions contained in a ResourceBundle.

Similar syntax as for a Map. This method is useful to enable standard Java internationalization support.

Parameters

rb - the ResourceBundle to load from

prefix - a filter within the keys in the map: e.g. 'beans.' (can be empty or null)

Exceptions

BeanDefinitionStoreException - in case of loading or parsing errors

Return
the number of bean definitions found

open fun registerBeanDefinitions(map: MutableMap<*, *>): Int

Register bean definitions contained in a Map, using all property keys (i.e. not filtering by prefix).

Parameters

map - Map: name -> property (String or Object). Property values will be strings if coming from a Properties file etc. Property names (keys) must be Strings. Class keys must be Strings.

Exceptions

BeansException - in case of loading or parsing errors

Return
the number of bean definitions found

See Also
#registerBeanDefinitions(java.util.Map, String, String)

open fun registerBeanDefinitions(map: MutableMap<*, *>, @Nullable prefix: String): Int

Register bean definitions contained in a Map. Ignore ineligible properties.

Parameters

map - Map name -> property (String or Object). Property values will be strings if coming from a Properties file etc. Property names (keys) must be Strings. Class keys must be Strings.

prefix - a filter within the keys in the map: e.g. 'beans.' (can be empty or null)

Exceptions

BeansException - in case of loading or parsing errors

Return
the number of bean definitions found

open fun registerBeanDefinitions(map: MutableMap<*, *>, @Nullable prefix: String, resourceDescription: String): Int

Register bean definitions contained in a Map. Ignore ineligible properties.

Parameters

map - Map name -> property (String or Object). Property values will be strings if coming from a Properties file etc. Property names (keys) must be strings. Class keys must be Strings.

prefix - a filter within the keys in the map: e.g. 'beans.' (can be empty or null)

resourceDescription - description of the resource that the Map came from (for logging purposes)

Exceptions

BeansException - in case of loading or parsing errors

Return
the number of bean definitions found

See Also
#registerBeanDefinitions(Map, String)