Parse cache:annotation-driven key-generator attribute
Prior to this change, the spring-cache XSD allowed a 'key-generator' attribute, but it was not actually parsed by AnnotationDrivenCacheBDP. This commit adds the parsing logic as originally intended and the test to prove it. Issue: SPR-8939
This commit is contained in:
@@ -76,7 +76,8 @@ class AnnotationDrivenCacheBeanDefinitionParser implements BeanDefinitionParser
|
||||
* Registers a
|
||||
* <pre>
|
||||
* <bean id="cacheAspect" class="org.springframework.cache.aspectj.AnnotationCacheAspect" factory-method="aspectOf">
|
||||
* <property name="cacheManagerBeanName" value="cacheManager"/>
|
||||
* <property name="cacheManager" ref="cacheManager"/>
|
||||
* <property name="keyGenerator" ref="keyGenerator"/>
|
||||
* </bean>
|
||||
*
|
||||
* </pre>
|
||||
@@ -89,6 +90,7 @@ class AnnotationDrivenCacheBeanDefinitionParser implements BeanDefinitionParser
|
||||
def.setBeanClassName(CACHE_ASPECT_CLASS_NAME);
|
||||
def.setFactoryMethodName("aspectOf");
|
||||
parseCacheManagerProperty(element, def);
|
||||
CacheNamespaceHandler.parseKeyGenerator(element, def);
|
||||
parserContext.registerBeanComponent(new BeanComponentDefinition(def, CACHE_ASPECT_BEAN_NAME));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user