+ add cache aspectj aspect

This commit is contained in:
Costin Leau 2011-12-08 13:20:01 +00:00
parent c472a163f1
commit 312b1aa3d6
2 changed files with 15 additions and 5 deletions

View File

@ -13,6 +13,7 @@
<aspect name="org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect"/> <aspect name="org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect"/>
<aspect name="org.springframework.scheduling.aspectj.AnnotationAsyncExecutionAspect"/> <aspect name="org.springframework.scheduling.aspectj.AnnotationAsyncExecutionAspect"/>
<aspect name="org.springframework.transaction.aspectj.AnnotationTransactionAspect"/> <aspect name="org.springframework.transaction.aspectj.AnnotationTransactionAspect"/>
<aspect name="org.springframework.cache.aspectj.AnnotationCacheAspect"/>
</aspects> </aspects>
</aspectj> </aspectj>

View File

@ -2,11 +2,15 @@
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:p="http://www.springframework.org/schema/p" xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd xmlns:cache="http://www.springframework.org/schema/cache"
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd"> xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<bean id="annotationSource" class="org.springframework.cache.annotation.AnnotationCacheOperationSource"/>
<!--
<aop:config> <aop:config>
<aop:advisor advice-ref="debugInterceptor" pointcut="execution(* *..CacheableService.*(..))" order="1"/> <aop:advisor advice-ref="debugInterceptor" pointcut="execution(* *..CacheableService.*(..))" order="1"/>
</aop:config> </aop:config>
@ -15,7 +19,12 @@
<property name="cacheManager" ref="cacheManager"/> <property name="cacheManager" ref="cacheManager"/>
<property name="cacheOperationSources" ref="annotationSource"/> <property name="cacheOperationSources" ref="annotationSource"/>
</bean> </bean>
<bean id="annotationSource" class="org.springframework.cache.annotation.AnnotationCacheOperationSource"/>
-->
<cache:annotation-driven mode="aspectj"/>
<bean id="cacheManager" class="org.springframework.cache.support.SimpleCacheManager"> <bean id="cacheManager" class="org.springframework.cache.support.SimpleCacheManager">
<property name="caches"> <property name="caches">
<set> <set>