spring-framework / org.springframework.beans.factory.xml / DefaultBeanDefinitionDocumentReader

DefaultBeanDefinitionDocumentReader

open class DefaultBeanDefinitionDocumentReader : BeanDefinitionDocumentReader

Default implementation of the BeanDefinitionDocumentReader interface that reads bean definitions according to the "spring-beans" DTD and XSD format (Spring's default XML bean definition format).

The structure, elements, and attribute names of the required XML document are hard-coded in this class. (Of course a transform could be run if necessary to produce this format). <beans> does not need to be the root element of the XML document: this class will parse all bean definition elements in the XML file, regardless of the actual root element.

Author
Rod Johnson

Author
Juergen Hoeller

Author
Rob Harrop

Author
Erik Wiersma

Since
18.12.2003

Constructors

<init>

DefaultBeanDefinitionDocumentReader()

Default implementation of the BeanDefinitionDocumentReader interface that reads bean definitions according to the "spring-beans" DTD and XSD format (Spring's default XML bean definition format).

The structure, elements, and attribute names of the required XML document are hard-coded in this class. (Of course a transform could be run if necessary to produce this format). <beans> does not need to be the root element of the XML document: this class will parse all bean definition elements in the XML file, regardless of the actual root element.

Properties

ALIAS_ATTRIBUTE

static val ALIAS_ATTRIBUTE: String

ALIAS_ELEMENT

static val ALIAS_ELEMENT: String

BEAN_ELEMENT

static val BEAN_ELEMENT: String

IMPORT_ELEMENT

static val IMPORT_ELEMENT: String

NAME_ATTRIBUTE

static val NAME_ATTRIBUTE: String

NESTED_BEANS_ELEMENT

static val NESTED_BEANS_ELEMENT: String

PROFILE_ATTRIBUTE

static val PROFILE_ATTRIBUTE: String

RESOURCE_ATTRIBUTE

static val RESOURCE_ATTRIBUTE: String

Functions

registerBeanDefinitions

open fun registerBeanDefinitions(doc: Document, readerContext: XmlReaderContext): Unit

This implementation parses bean definitions according to the "spring-beans" XSD (or DTD, historically).

Opens a DOM Document; then initializes the default settings specified at the <beans/> level; then parses the contained bean definitions.