Skip to content

Commit 312b1aa

Browse files
author
Costin Leau
committed
+ add cache aspectj aspect
1 parent c472a16 commit 312b1aa

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

org.springframework.aspects/src/main/resources/META-INF/aop.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<aspect name="org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect"/>
1414
<aspect name="org.springframework.scheduling.aspectj.AnnotationAsyncExecutionAspect"/>
1515
<aspect name="org.springframework.transaction.aspectj.AnnotationTransactionAspect"/>
16+
<aspect name="org.springframework.cache.aspectj.AnnotationCacheAspect"/>
1617
</aspects>
1718

1819
</aspectj>

org.springframework.aspects/src/test/java/org/springframework/cache/config/annotation-cache-aspectj.xml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xmlns:aop="http://www.springframework.org/schema/aop"
44
xmlns:p="http://www.springframework.org/schema/p"
5-
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
6-
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd">
5+
xmlns:cache="http://www.springframework.org/schema/cache"
6+
xmlns:context="http://www.springframework.org/schema/context"
7+
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
8+
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
9+
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd
10+
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
711

8-
<bean id="annotationSource" class="org.springframework.cache.annotation.AnnotationCacheOperationSource"/>
9-
12+
13+
<!--
1014
<aop:config>
1115
<aop:advisor advice-ref="debugInterceptor" pointcut="execution(* *..CacheableService.*(..))" order="1"/>
1216
</aop:config>
@@ -15,7 +19,12 @@
1519
<property name="cacheManager" ref="cacheManager"/>
1620
<property name="cacheOperationSources" ref="annotationSource"/>
1721
</bean>
18-
22+
23+
<bean id="annotationSource" class="org.springframework.cache.annotation.AnnotationCacheOperationSource"/>
24+
-->
25+
26+
<cache:annotation-driven mode="aspectj"/>
27+
1928
<bean id="cacheManager" class="org.springframework.cache.support.SimpleCacheManager">
2029
<property name="caches">
2130
<set>

0 commit comments

Comments
 (0)