public class FreeMarkerConfigurerBeanDefinitionParser extends AbstractSingleBeanDefinitionParser
<mvc:freemarker-configurer>
MVC namespace element and
register FreeMarkerConfigurer
bean.Modifier and Type | Field and Description |
---|---|
static String |
BEAN_NAME
The bean name used for the
FreeMarkerConfigurer . |
ID_ATTRIBUTE, NAME_ATTRIBUTE
Constructor and Description |
---|
FreeMarkerConfigurerBeanDefinitionParser() |
Modifier and Type | Method and Description |
---|---|
protected void |
doParse(Element element,
ParserContext parserContext,
BeanDefinitionBuilder builder)
Parse the supplied
Element and populate the supplied
BeanDefinitionBuilder as required. |
protected String |
getBeanClassName(Element element)
Determine the bean class name corresponding to the supplied
Element . |
protected String |
resolveId(Element element,
AbstractBeanDefinition definition,
ParserContext parserContext)
Resolve the ID for the supplied
BeanDefinition . |
doParse, getBeanClass, getParentName, parseInternal
parse, postProcessComponentDefinition, registerBeanDefinition, shouldFireEvents, shouldGenerateId, shouldGenerateIdAsFallback, shouldParseNameAsAliases
public static final String BEAN_NAME
FreeMarkerConfigurer
.public FreeMarkerConfigurerBeanDefinitionParser()
protected String getBeanClassName(Element element)
AbstractSingleBeanDefinitionParser
Element
.getBeanClassName
in class AbstractSingleBeanDefinitionParser
element
- the Element
that is being parsedElement
, or null
if noneAbstractSingleBeanDefinitionParser.getBeanClass(org.w3c.dom.Element)
protected String resolveId(Element element, AbstractBeanDefinition definition, ParserContext parserContext)
AbstractBeanDefinitionParser
BeanDefinition
.
When using generation
, a name is generated automatically.
Otherwise, the ID is extracted from the "id" attribute, potentially with a
fallback
to a generated id.
resolveId
in class AbstractBeanDefinitionParser
element
- the element that the bean definition has been built fromdefinition
- the bean definition to be registeredparserContext
- the object encapsulating the current state of the parsing process;
provides access to a BeanDefinitionRegistry
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder)
AbstractSingleBeanDefinitionParser
Element
and populate the supplied
BeanDefinitionBuilder
as required.
The default implementation delegates to the doParse
version without ParserContext argument.
doParse
in class AbstractSingleBeanDefinitionParser
element
- the XML element being parsedparserContext
- the object encapsulating the current state of the parsing processbuilder
- used to define the BeanDefinition
AbstractSingleBeanDefinitionParser.doParse(Element, BeanDefinitionBuilder)