org.apache.ibatis.executor.parameter.ParameterHandler
org.apache.ibatis.executor.resultset.ResultSetHandler
org.apache.ibatis.executor.statement.StatementHandler
org.apache.ibatis.executor.Executor

二、Mybatis的插件功能接入步骤

1、实现接口:org.apache.ibatis.plugin.Interceptor

2、实现类上需要添加注解@Intercepts和@Signature 用于描述要进行拦截的类接口和方法

@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Intercepts {
  Signature[] value(); //要拦截的方法信息描述
}

@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Signature {
  Class<?> type(); //要拦截的类的描述(接口)

  String method();//要拦截的方法名

  Class<?>[] args();//要拦截的方法名的参数列表的类型
}
View Code

相关文章:

  • 2021-06-27
  • 2022-01-16
  • 2021-09-22
  • 2021-10-18
  • 2021-12-14
  • 2021-07-29
  • 2021-08-08
  • 2021-05-28
猜你喜欢
  • 2021-08-28
  • 2021-05-05
  • 2022-02-04
  • 2022-01-04
  • 2021-10-11
  • 2021-10-03
  • 2021-09-13
相关资源
相似解决方案