Annotation Type 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
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      Signature[] value
      Returns method signatures to intercept.
    • Element Detail

      • value

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