当前使用版本(必填,否则不予处理)
3.4.3
该问题是如何引起的?(确定最新版也有问题再提!!!)
对,最新版也有问题
重现步骤(如果有就写完整)
无
报错信息
T是entity,M才是mapper,currentModelClass不可能是entity,写错了,建议改正
protected Class<T> currentModelClass() {
return (Class<T>) ReflectionKit.getSuperClassGenericType(getClass(), 1);
}
泛型本来就是编译检查的,增加代码的强壮性,但是这样写错以后,覆盖的时候,反而不能使用泛型,必须把泛型去掉,才能写出正确的代码,这样反而失去了泛型的本意
Comment From: qmdx
你应该说的是 currentMapperClass 吧,已经调整
Comment From: ghost
currentMapperClass 恩恩,写着写着就写错了,改了就好