Class MPJInterceptor

java.lang.Object
com.github.yulichang.interceptor.MPJInterceptor
All Implemented Interfaces:
org.apache.ibatis.plugin.Interceptor

@Intercepts(@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})) public class MPJInterceptor extends Object implements org.apache.ibatis.plugin.Interceptor
连表拦截器

用于实现动态resultType

Author:
yulichang
  • Constructor Details

    • MPJInterceptor

      public MPJInterceptor()
  • Method Details

    • intercept

      public Object intercept(org.apache.ibatis.plugin.Invocation invocation) throws Throwable
      Specified by:
      intercept in interface org.apache.ibatis.plugin.Interceptor
      Throws:
      Throwable
    • getMappedStatement

      public <E> org.apache.ibatis.mapping.MappedStatement getMappedStatement(org.apache.ibatis.mapping.MappedStatement ms, Class<?> resultType, Object ew, Map<String,Object> map)
      获取MappedStatement
    • plugin

      public Object plugin(Object target)
      Specified by:
      plugin in interface org.apache.ibatis.plugin.Interceptor
    • setProperties

      public void setProperties(Properties properties)
      Specified by:
      setProperties in interface org.apache.ibatis.plugin.Interceptor