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 {
   public Object intercept(Invocation invocation) throws Throwable {
     // implement pre-processing if needed
     Object returnObject = invocation.proceed();
     // implement post-processing if needed
     return returnObject;
Clinton Begin
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Returns method signatures to intercept.
  • Element Details

    • value

      Signature[] value
      Returns method signatures to intercept.
      method signatures