abstract class AbstractSingleBeanDefinitionParser : AbstractBeanDefinitionParser
Base class for those BeanDefinitionParser implementations that need to parse and define just a single BeanDefinition.
Extend this parser class when you want to create a single bean definition from an arbitrarily complex XML element. You may wish to consider extending the AbstractSimpleBeanDefinitionParser when you want to create a single bean definition from a relatively simple custom XML element.
The resulting BeanDefinition will be automatically registered with the org.springframework.beans.factory.support.BeanDefinitionRegistry. Your job simply is to parse the custom XML Element into a single BeanDefinition.
Author
Rob Harrop
Author
Juergen Hoeller
Author
Rick Evans
Since
2.0
See Also
#getBeanClass#getBeanClassName#doParse
AbstractSingleBeanDefinitionParser()
Base class for those BeanDefinitionParser implementations that need to parse and define just a single Extend this parser class when you want to create a single bean definition from an arbitrarily complex XML element. You may wish to consider extending the AbstractSimpleBeanDefinitionParser when you want to create a single bean definition from a relatively simple custom XML element. The resulting |
static val ID_ATTRIBUTE: String
Constant for the "id" attribute |
|
static val NAME_ATTRIBUTE: String
Constant for the "name" attribute |
fun parse(element: Element, parserContext: ParserContext): BeanDefinition |
abstract class AbstractSimpleBeanDefinitionParser : AbstractSingleBeanDefinitionParser
Convenient base class for when there exists a one-to-one mapping between attribute names on the element that is to be parsed and the property names on the Class being configured. Extend this parser class when you want to create a single bean definition from a relatively simple custom XML element. The resulting An example will hopefully make the use of this particular parser class immediately clear. Consider the following class definition:
Then let us assume the following XML tag has been defined to permit the easy configuration of instances of the above class;
All that is required of the Java developer tasked with writing the parser to parse the above XML tag into an actual
Please note that the The process of actually registering the For an example of this parser in action (so to speak), do look at the source code for the org.springframework.beans.factory.xml.UtilNamespaceHandler.PropertiesBeanDefinitionParser; the observant (and even not so observant) reader will immediately notice that there is next to no code in the implementation. The
The observant reader will notice that the sole attribute on the |
|
open class ExecutorBeanDefinitionParser : AbstractSingleBeanDefinitionParser
Parser for the 'executor' element of the 'task' namespace. |
|
open class FreeMarkerConfigurerBeanDefinitionParser : AbstractSingleBeanDefinitionParser
Parse the MVC namespace element and register FreeMarkerConfigurer bean |
|
open class JtaTransactionManagerBeanDefinitionParser : AbstractSingleBeanDefinitionParser
Parser for the <tx:jta-transaction-manager/> XML configuration element, autodetecting WebLogic and WebSphere servers and exposing the corresponding org.springframework.transaction.jta.JtaTransactionManager subclass. |
|
open class ScheduledTasksBeanDefinitionParser : AbstractSingleBeanDefinitionParser
Parser for the 'scheduled-tasks' element of the scheduling namespace. |
|
open class SchedulerBeanDefinitionParser : AbstractSingleBeanDefinitionParser
Parser for the 'scheduler' element of the 'task' namespace. |
|
open class TilesConfigurerBeanDefinitionParser : AbstractSingleBeanDefinitionParser
Parse the MVC namespace element and register a corresponding TilesConfigurer bean. |