org.hibernate.hql.ast.QuerySyntaxException: unexpected token: from near line 1, column 17 [select count(*) from Object]
原因是:
public Class getGenericType(){
//获取父类中的泛型类型
Type type = super.getClass().getGenericSuperclass();
//判断是否传递了泛型
if(!(type instanceof ParameterizedType)){
return Object.class;
}
Type[] types = ((ParameterizedType)type).getActualTypeArguments();
return (Class) types[0];
}
是因为在if(!(type instanceof ParameterizedType)){return Object.class;}判断中没有“!”造成的错误
org.hibernate.hql.ast.QuerySyntaxException: unexpected token: from near line 1, column 17 [select co
最新推荐文章于 2021-03-18 06:53:01 发布