Custom cache annotations and AspectJ

This commit clarifies what should be done in order to use custom cache
annotations with AspectJ.

Issue: SPR-11503
master
Stephane Nicoll 10 years ago
parent 3c72849ee4
commit d6b1cdc55f
  1. 11
      src/asciidoc/index.adoc

@ -47844,6 +47844,17 @@ using the aspectj mode in this case.
[[cache-annotation-stereotype]] [[cache-annotation-stereotype]]
==== Using custom annotations ==== Using custom annotations
.Custom annotation and AspectJ
****
This feature only works out-of-the-box with the proxy-based approach but can be enabled
with a bit of extra effort using AspectJ.
The `spring-aspects` module defines an aspect for the standard annotations only. If you
have defined your own annotations, you also need to define an aspect for those. Check
`AnnotationCacheAspect` for an example.
****
The caching abstraction allows you to use your own annotations to identify what method The caching abstraction allows you to use your own annotations to identify what method
triggers cache population or eviction. This is quite handy as a template mechanism as it triggers cache population or eviction. This is quite handy as a template mechanism as it
eliminates the need to duplicate cache annotation declarations (especially useful if the eliminates the need to duplicate cache annotation declarations (especially useful if the

Loading…
Cancel
Save