title: Method threw 'java.lang.StackOverflowError' exception. Cannot evaluate com.sun.proxy.$Proxy0.toString()
body: <p>I am using JDKProxy to implement mybatis, but I have a question</p>
  
  <p>I have no code with <code>proxy.toString()</code></p>
  
  <pre class="lang-java prettyprint-override"><code>public class BootStrap {
      public static void start(){
          MySqlSession sqlSession = new MySqlSession();
          TestMapper testMapper = sqlSession.getMapper(TestMapper.class);
          Test test = testMapper.selectByPrimaryKey(2);
      }
  
      public static void main(String[] args){
          start();
      }
  }
  </code></pre>
  
  <pre class="lang-java prettyprint-override"><code>@Data
  public class MySqlSession {
      public &lt;T&gt; T getMapper(Class&lt;T&gt; clazz){
          return (T) Proxy.newProxyInstance(
                  clazz.getClassLoader(),//类加载器
                  new Class[]{clazz},//接口
                  new MapperProxy(this));//代理类
      }
  
      public &lt;T&gt; T selectByPrimaryKey(MapperData mapperData, Object parameter){
          return executor.query(mapperData,parameter);
      }
  }
  </code></pre>
  
  <pre class="lang-java prettyprint-override"><code>//it is no "proxy.toString" 
  //the bug is in this method
  public class MapperProxy&lt;T&gt; implements InvocationHandler {
  
      public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
          try {
              int seperate = method.getDeclaringClass().getName().lastIndexOf(".");
              String mapper = method.getDeclaringClass().getName().substring(seperate + 1);
              MapperData mapperData =
                      sqlSession.getConfiguration()
                              .getMapperRegistory()
                              .get(mapper + "." + method.getName());
              if(null != mapperData){
                  System.out.println(String.format("SQL [%s],parameter [%s]", mapperData.getSql(), args[0]));
                  Class&lt;?&gt; clazz = sqlSession.getClass();
                  Method realMethod = clazz.getMethod(method.getName(), new Class[]{MapperData.class, Object.class});
                  return realMethod.invoke(sqlSession,mapperData,args);
              }
              return method.invoke(sqlSession,args);
          }catch (InvocationTargetException ite) {
              throw ite.getCause();
          }
      }
  }
  </code></pre>
  
  <p>If I run <code>return method.invoke(sqlSession,args);</code>, this bug disappear，so I think the bug is in this method</p>