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

loadBeanDefinitions

open fun loadBeanDefinitions(resource: Resource): Int

Load bean definitions from the specified properties file, using all property keys (i.e. not filtering by prefix).

Parameters

resource - the resource descriptor for the properties file

Exceptions

BeanDefinitionStoreException - in case of loading or parsing errors

Return
the number of bean definitions found

See Also
#loadBeanDefinitions(org.springframework.core.io.Resource, String)

open fun loadBeanDefinitions(resource: Resource, @Nullable prefix: String): Int

Load bean definitions from the specified properties file.

Parameters

resource - the resource descriptor for the properties file

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 loadBeanDefinitions(encodedResource: EncodedResource): Int

Load bean definitions from the specified properties file.

Parameters

encodedResource - the resource descriptor for the properties file, allowing to specify an encoding to use for parsing the file

Exceptions

BeanDefinitionStoreException - in case of loading or parsing errors

Return
the number of bean definitions found

open fun loadBeanDefinitions(encodedResource: EncodedResource, @Nullable prefix: String): Int

Load bean definitions from the specified properties file.

Parameters

encodedResource - the resource descriptor for the properties file, allowing to specify an encoding to use for parsing the file

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