Spring uses the term an object
Advisor to represent an aspect, including a notification and a cut point specifying a specific connection point. Various notices types
MethodInterceptor (interceptor API from AOP Alliance) and definition
The notification interface in the org.springframework.Aop package. All notices must be implemented
Org.aopalliance.Aop.Advice label interface. Spring-framework-1.1.2 supports the notification that can be used
MethodInterceptor,
ThrowsAdvice,
BeforeAdvice and
AfterreturningAdvice. The strange thing is that Spring-framework-1.1.1 actually has a MethodAfterReturningAdvice notification, why is it until 1.1.2? Don't understand, depressed! ! Even the MethodCacheInterceptor class that implements the MethodInterceptor, the InitializingBean interface is used as a method to process the result interceptor, combined with EHCACHE to make a cache. For example, the result set of the business service class PUBLIC LIST GETALLONIZATIONS () is intercepted after the MethodCacheInterceptor intercepts. Other methods then in this business class service on influential cached objects, such as createOrganization (Organization org), updateOrganization (Organization org), removeOrganization (Organization org), that implement AfterReturningAdvice, InitializingBean MethodCacheAfterAdvice notification interface to do for the execution method The rear cache refreshes the interceptor. In this way, at the end of the business service class, you will not be able to use AOP to cache as named.
In the JDonFramework framework, the business service class in its example (
Create a user model inside ClearCache () This and cache-related operations are visible everywhere. TODO: * MethodCacheafteradvice currently only supports method parameters or method returns to inherit the interception of Entity Pojo objects
* Cache KEY judgment and processing, currently getall *** s () code> hardcodes