类 MybatisPlusInterceptor

  • 所有已实现的接口:
    org.apache.ibatis.plugin.Interceptor

    @Signature(type=org.apache.ibatis.executor.statement.StatementHandler.class,method="prepare",args={java.sql.Connection.class,java.lang.Integer.class}) @Signature(type=org.apache.ibatis.executor.statement.StatementHandler.class,method="getBoundSql",args={}) @Signature(type=org.apache.ibatis.executor.Executor.class,method="update",args={org.apache.ibatis.mapping.MappedStatement.class,java.lang.Object.class}) @Signature(type=org.apache.ibatis.executor.Executor.class,method="query",args={org.apache.ibatis.mapping.MappedStatement.class,java.lang.Object.class,org.apache.ibatis.session.RowBounds.class,org.apache.ibatis.session.ResultHandler.class}) @Signature(type=org.apache.ibatis.executor.Executor.class,method="query",args={org.apache.ibatis.mapping.MappedStatement.class,java.lang.Object.class,org.apache.ibatis.session.RowBounds.class,org.apache.ibatis.session.ResultHandler.class,org.apache.ibatis.cache.CacheKey.class,org.apache.ibatis.mapping.BoundSql.class})
    public class MybatisPlusInterceptor
    extends java.lang.Object
    implements org.apache.ibatis.plugin.Interceptor
    从以下版本开始:
    3.4.0
    作者:
    miemie
    • 构造器详细资料

      • MybatisPlusInterceptor

        public MybatisPlusInterceptor()
    • 方法详细资料

      • intercept

        public java.lang.Object intercept​(org.apache.ibatis.plugin.Invocation invocation)
                                   throws java.lang.Throwable
        指定者:
        intercept 在接口中 org.apache.ibatis.plugin.Interceptor
        抛出:
        java.lang.Throwable
      • plugin

        public java.lang.Object plugin​(java.lang.Object target)
        指定者:
        plugin 在接口中 org.apache.ibatis.plugin.Interceptor
      • addInnerInterceptor

        public void addInnerInterceptor​(InnerInterceptor innerInterceptor)
      • setProperties

        public void setProperties​(java.util.Properties properties)
        使用内部规则,拿分页插件举个栗子:

        - key: "@page" ,value: "com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor" - key: "page:limit" ,value: "100"

        解读1: key 以 "@" 开头定义了这是一个需要组装的 `InnerInterceptor`, 以 "page" 结尾表示别名 value 是 `InnerInterceptor` 的具体的 class 全名 解读2: key 以上面定义的 "别名 + ':'" 开头指这个 `value` 是定义的该 `InnerInterceptor` 属性需要设置的值

        如果这个 `InnerInterceptor` 不需要配置属性也要加别名

        指定者:
        setProperties 在接口中 org.apache.ibatis.plugin.Interceptor
      • setInterceptors

        public void setInterceptors​(java.util.List<InnerInterceptor> interceptors)