当前使用版本(必填,否则不予处理)

3.1.0

该问题是如何引起的?(确定最新版也有问题再提!!!)

使用 saveBatch接口报错,serviceImpl中对应mapper和实体类都指定了

重现步骤(如果有就写完整)

MyBatis-Plus Error: Cannot execute table Method, ClassGenricType not found . MyBatis-Plus Error: Cannot execute table Method, ClassGenricType not found . MyBatis-Plus Error: Cannot execute table Method, ClassGenricType not found .

报错信息

com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Error: Cannot execute table Method, ClassGenricType not found .

Comment From: miemieYaho

确定最新版也有问题再提!!!

Comment From: andychen1555

确定最新版也有问题!!!

Comment From: andychen1555

3.3.2

Comment From: miemieYaho

给出你的复现demo

Comment From: andychen1555

上面给了啊 类对照关系都有啊

Comment From: miemieYaho

你给的无法复现

Comment From: andychen1555

启动后 TableInfoHelper, TABLE_INFO_CACHE 没有缓存下来对应的表?

Comment From: andychen1555

public static TableInfo getTableInfo(Class<?> clazz) { if (clazz == null) { return null; } else { TableInfo tableInfo = (TableInfo)TABLE_INFO_CACHE.get(ClassUtils.getUserClass(clazz)); if (null != tableInfo) { return tableInfo; } else { for(Class currentClass = clazz; null == tableInfo && Object.class != currentClass; tableInfo = (TableInfo)TABLE_INFO_CACHE.get(ClassUtils.getUserClass(currentClass))) { currentClass = currentClass.getSuperclass(); }

            if (tableInfo != null) {
                TABLE_INFO_CACHE.put(ClassUtils.getUserClass(clazz), tableInfo);
            }

            return tableInfo;
        }
    }
}

这一段没获取到表

Comment From: miemieYaho

那你就扫描mapper让他初始化啊

Comment From: andychen1555

扫了啊 项目里用了多个数据源 没用mp的多数据源配置 会导致这个问题?

Comment From: miemieYaho

你自己启动debug看 TableInfoHelper#initTableInfo