Annotation Interface Intercepts


@Documented @Retention(RUNTIME) @Target(TYPE) public @interface Intercepts
The annotation that specify target methods to intercept.

How to use:

 @Intercepts({ @Signature(
   type = Executor.class,
   method = "update",
   args = { MappedStatement.class, Object.class }) })
 public class ExamplePlugin implements Interceptor {
   @Override
   public Object intercept(Invocation invocation) throws Throwable {
     // implement pre-processing if needed
     Object returnObject = invocation.proceed();
     // implement post-processing if needed
     return returnObject;
   }
 }
 
Author:
Clinton Begin