class AnnotationDrivenCacheBeanDefinitionParser extends java.lang.Object implements BeanDefinitionParser
BeanDefinitionParser
implementation that allows users to easily configure all the
infrastructure beans required to enable annotation-driven cache
demarcation.
By default, all proxies are created as JDK proxies. This may cause
some problems if you are injecting objects as concrete classes rather
than interfaces. To overcome this restriction you can set the
'proxy-target-class
' attribute to 'true
', which will
result in class-based proxies being created.
Modifier and Type | Class and Description |
---|---|
private static class |
AnnotationDrivenCacheBeanDefinitionParser.AopAutoProxyConfigurer
Inner class to just introduce an AOP framework dependency when actually in proxy mode.
|
Constructor and Description |
---|
AnnotationDrivenCacheBeanDefinitionParser() |
Modifier and Type | Method and Description |
---|---|
BeanDefinition |
parse(org.w3c.dom.Element element,
ParserContext parserContext)
Parses the '
<cache:annotation-driven> ' tag. |
private static void |
parseCacheManagerProperty(org.w3c.dom.Element element,
BeanDefinition def) |
private void |
registerCacheAspect(org.w3c.dom.Element element,
ParserContext parserContext)
Registers a
|
AnnotationDrivenCacheBeanDefinitionParser()
public BeanDefinition parse(org.w3c.dom.Element element, ParserContext parserContext)
<cache:annotation-driven>
' tag. Will
register an AutoProxyCreator
with the container as necessary.parse
in interface BeanDefinitionParser
element
- the element that is to be parsed into one or more BeanDefinitions
parserContext
- the object encapsulating the current state of the parsing process;
provides access to a BeanDefinitionRegistry
BeanDefinition
private static void parseCacheManagerProperty(org.w3c.dom.Element element, BeanDefinition def)
private void registerCacheAspect(org.w3c.dom.Element element, ParserContext parserContext)