org.springframework.cache.config
Class AnnotationDrivenCacheBeanDefinitionParser

java.lang.Object
  extended by org.springframework.cache.config.AnnotationDrivenCacheBeanDefinitionParser
All Implemented Interfaces:
BeanDefinitionParser

 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.

Since:
3.1
Author:
Costin Leau

Nested Class Summary
private static class AnnotationDrivenCacheBeanDefinitionParser.AopAutoProxyConfigurer
          Inner class to just introduce an AOP framework dependency when actually in proxy mode.
 
Constructor Summary
AnnotationDrivenCacheBeanDefinitionParser()
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationDrivenCacheBeanDefinitionParser

AnnotationDrivenCacheBeanDefinitionParser()
Method Detail

parse

public BeanDefinition parse(org.w3c.dom.Element element,
                            ParserContext parserContext)
Parses the '<cache:annotation-driven>' tag. Will register an AutoProxyCreator with the container as necessary.

Specified by:
parse in interface BeanDefinitionParser
Parameters:
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
Returns:
the primary BeanDefinition

parseCacheManagerProperty

private static void parseCacheManagerProperty(org.w3c.dom.Element element,
                                              BeanDefinition def)

registerCacheAspect

private void registerCacheAspect(org.w3c.dom.Element element,
                                 ParserContext parserContext)
Registers a
 
   
 

 

Parameters:
element -
parserContext -