出现此错误的原因是MyBatis 3.4.0 之后,StatementHandler的prepare方法做了修改,如下:

    1. Statement prepare(Connection connection, Integer transactionTimeout) throws SQLException;

    因此,解决办法:在args = { Connection.class }中添加第二个参数,即:

    1. @Intercepts({ @Signature(type = StatementHandler.class, method = "prepare", args = { Connection.class,Integer.class }) })

    参考网址:https://blog.csdn.net/zsq520520/article/details/69666734