abstract class AbstractBeanDefinitionReader : EnvironmentCapable, BeanDefinitionReader
Abstract base class for bean definition readers which implement the BeanDefinitionReader interface.
Provides common properties like the bean factory to work on and the class loader to use for loading bean classes.
Author
Juergen Hoeller
Author
Chris Beams
Since
11.12.2003
See Also
BeanDefinitionReaderUtils
open fun getBeanClassLoader(): ClassLoader |
|
fun getBeanFactory(): BeanDefinitionRegistry |
|
open fun getBeanNameGenerator(): BeanNameGenerator |
|
open fun getEnvironment(): Environment |
|
fun getRegistry(): BeanDefinitionRegistry |
|
open fun getResourceLoader(): ResourceLoader |
|
open fun loadBeanDefinitions(vararg resources: Resource): Intopen fun loadBeanDefinitions(location: String): Intopen fun loadBeanDefinitions(vararg locations: String): Intopen fun loadBeanDefinitions(location: String, actualResources: MutableSet<Resource>): Int
Load bean definitions from the specified resource location. The location can also be a location pattern, provided that the ResourceLoader of this bean definition reader is a ResourcePatternResolver. |
|
open fun setBeanClassLoader(beanClassLoader: ClassLoader): Unit
Set the ClassLoader to use for bean classes. Default is |
|
open fun setBeanNameGenerator(beanNameGenerator: BeanNameGenerator): Unit
Set the BeanNameGenerator to use for anonymous beans (without explicit bean name specified). Default is a DefaultBeanNameGenerator. |
|
open fun setEnvironment(environment: Environment): Unit
Set the Environment to use when reading bean definitions. Most often used for evaluating profile information to determine which bean definitions should be read and which should be omitted. |
|
open fun setResourceLoader(resourceLoader: ResourceLoader): Unit
Set the ResourceLoader to use for resource locations. If specifying a ResourcePatternResolver, the bean definition reader will be capable of resolving resource patterns to Resource arrays. Default is PathMatchingResourcePatternResolver, also capable of resource pattern resolving through the ResourcePatternResolver interface. Setting this to |
open class GroovyBeanDefinitionReader : AbstractBeanDefinitionReader, GroovyObject
A Groovy-based reader for Spring bean definitions: like a Groovy builder, but more of a DSL for Spring configuration. This bean definition reader also understands XML bean definition files, allowing for seamless mixing and matching with Groovy bean definition files. Typically applied to a org.springframework.beans.factory.support.DefaultListableBeanFactory or a org.springframework.context.support.GenericApplicationContext, but can be used against any BeanDefinitionRegistry implementation. Example Syntax
You can also load resources containing beans defined in a Groovy script using either the
|
|
open class PropertiesBeanDefinitionReader : AbstractBeanDefinitionReader
Bean definition reader for a simple properties format. Provides bean definition registration methods for Map/Properties and ResourceBundle. Typically applied to a DefaultListableBeanFactory. Example:
|