We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
问题位于tk.mybatis.mapper.mapperhelper.MapperTemplate.getEntityClass(MappedStatement)函数中的 Class<?> returnType = (Class<?>) t.getActualTypeArguments()[0];
Class<?> returnType = (Class<?>) t.getActualTypeArguments()[0];
经测试,以下场景会触发
public interface MyMapper extends Mapper<Info<?>
interface MyMapper<T> extends Mapper<T>
interface MyMapper<T> extends Mapper<T[]>
实际使用中,场景1容易发生,场景2和3相对少见,但根据报出来的异常很难发现问题
The text was updated successfully, but these errors were encountered:
50d9ebf
Merge pull request #887 from samyge/master
5e31029
解决Mapper父接口的泛型信息在使用泛型的场景下报ClassCastException的问题,fixed #886
No branches or pull requests
问题位于tk.mybatis.mapper.mapperhelper.MapperTemplate.getEntityClass(MappedStatement)函数中的
Class<?> returnType = (Class<?>) t.getActualTypeArguments()[0];
经测试,以下场景会触发
public interface MyMapper extends Mapper<Info<?>
此时t.getActualTypeArguments()[0]的实际类型为:ParameterizedType
interface MyMapper<T> extends Mapper<T>
此时t.getActualTypeArguments()[0]的实际类型为:TypeVariable
interface MyMapper<T> extends Mapper<T[]>
此时t.getActualTypeArguments()[0]的实际类型为:GenericArrayType
实际使用中,场景1容易发生,场景2和3相对少见,但根据报出来的异常很难发现问题
The text was updated successfully, but these errors were encountered: