Top Description Fields Constructors Methods
org.springframework.web.servlet.config

pack-priv Class ResourcesBeanDefinitionParser

extends Object
implements BeanDefinitionParser
Class Inheritance
All Implemented Interfaces
org.springframework.beans.factory.xml.BeanDefinitionParser
Imports
java.util.Map, java.util.concurrent.TimeUnit, org.w3c.dom.Element, org.springframework.beans.MutablePropertyValues, org.springframework.beans.factory.config.BeanDefinition, .ConstructorArgumentValues, .RuntimeBeanReference, org.springframework.beans.factory.parsing.BeanComponentDefinition, org.springframework.beans.factory.support.ManagedList, .ManagedMap, .RootBeanDefinition, org.springframework.beans.factory.xml.BeanDefinitionParser, .ParserContext, org.springframework.cache.concurrent.ConcurrentMapCache, org.springframework.core.Ordered, org.springframework.http.CacheControl, org.springframework.lang.Nullable, org.springframework.util.ClassUtils, .StringUtils, org.springframework.util.xml.DomUtils, org.springframework.web.servlet.handler.MappedInterceptor, .SimpleUrlHandlerMapping, org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter, org.springframework.web.servlet.resource.CachingResourceResolver, .CachingResourceTransformer, .ContentVersionStrategy, .CssLinkResourceTransformer, .FixedVersionStrategy, .PathResourceResolver, .ResourceHttpRequestHandler, .ResourceResolver, .ResourceTransformer, .ResourceUrlProvider, .ResourceUrlProviderExposingInterceptor, .VersionResourceResolver, .WebJarsResourceResolver

org.springframework.beans.factory.xml.BeanDefinitionParser that parses a resources element to register a ResourceHttpRequestHandler and register a SimpleUrlHandlerMapping for mapping resource requests, and a HttpRequestHandlerAdapter. Will also create a resource handling chain with ResourceResolvers and ResourceTransformers.
Authors
Keith Donald, Jeremy Grelle, Brian Clozel
Since
3.0.4

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final boolean

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public BeanDefinition
parse(Element
the element that is to be parsed into one or more BeanDefinitions
element
,
ParserContext
the object encapsulating the current state of the parsing process; provides access to a org.springframework.beans.factory.support.BeanDefinitionRegistry
context
)

Implements org.springframework.beans.factory.xml.BeanDefinitionParser.parse.

Parse the specified Element and register the resulting BeanDefinition(s) with the BeanDefinitionRegistry embedded in the supplied ParserContext.

private CacheControl
private void
parseResourceCache(ManagedList<Object> resourceResolvers, ManagedList<Object> resourceTransformers, Element element, Object source)

private void
parseResourceChain(RootBeanDefinition resourceHandlerDef, ParserContext context, Element element, Object source)

private void
parseResourceResolversTransformers(boolean isAutoRegistration, ManagedList<Object> resourceResolvers, ManagedList<Object> resourceTransformers, ParserContext context, Element element, Object source)

private RootBeanDefinition
private String
registerResourceHandler(ParserContext context, Element element, RuntimeBeanReference pathHelperRef, Object source)

private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CONTENT_VERSION_STRATEGY_ELEMENTback to summary
private static final String CONTENT_VERSION_STRATEGY_ELEMENT
FIXED_VERSION_STRATEGY_ELEMENTback to summary
private static final String FIXED_VERSION_STRATEGY_ELEMENT
RESOURCE_CHAIN_CACHEback to summary
private static final String RESOURCE_CHAIN_CACHE
RESOURCE_URL_PROVIDERback to summary
private static final String RESOURCE_URL_PROVIDER
VERSION_RESOLVER_ELEMENTback to summary
private static final String VERSION_RESOLVER_ELEMENT
VERSION_STRATEGY_ELEMENTback to summary
private static final String VERSION_STRATEGY_ELEMENT
webJarsPresentback to summary
private static final boolean webJarsPresent

Constructor Detail

ResourcesBeanDefinitionParserback to summary
pack-priv ResourcesBeanDefinitionParser()

Method Detail

parseback to summary
public BeanDefinition parse(Element element, ParserContext context)

Implements org.springframework.beans.factory.xml.BeanDefinitionParser.parse.

Doc from org.springframework.beans.factory.xml.BeanDefinitionParser.parse.

Parse the specified Element and register the resulting BeanDefinition(s) with the BeanDefinitionRegistry embedded in the supplied ParserContext.

Implementations must return the primary BeanDefinition that results from the parse if they will ever be used in a nested fashion (for example as an inner tag in a <property/> tag). Implementations may return null if they will not be used in a nested fashion.

Parameters
element:Element

the element that is to be parsed into one or more BeanDefinitions

context:ParserContext

the object encapsulating the current state of the parsing process; provides access to a org.springframework.beans.factory.support.BeanDefinitionRegistry

Returns:BeanDefinition

the primary BeanDefinition

Annotations
@Override
parseCacheControlback to summary
private CacheControl parseCacheControl(Element element)
parseResourceCacheback to summary
private void parseResourceCache(ManagedList<Object> resourceResolvers, ManagedList<Object> resourceTransformers, Element element, Object source)
parseResourceChainback to summary
private void parseResourceChain(RootBeanDefinition resourceHandlerDef, ParserContext context, Element element, Object source)
parseResourceResolversTransformersback to summary
private void parseResourceResolversTransformers(boolean isAutoRegistration, ManagedList<Object> resourceResolvers, ManagedList<Object> resourceTransformers, ParserContext context, Element element, Object source)
parseVersionResolverback to summary
private RootBeanDefinition parseVersionResolver(ParserContext context, Element element, Object source)
registerResourceHandlerback to summary
private String registerResourceHandler(ParserContext context, Element element, RuntimeBeanReference pathHelperRef, Object source)
Annotations
@Nullable
registerUrlProviderback to summary
private void registerUrlProvider(ParserContext context, Object source)