org.hibernate.exception.SQLGrammarException: could not extract ResultSet

今天是SQL语句写错。
String type
String hql="select * from t_user where type="+type;

这里应该改为 String hql="select * from t_user where type='"+type+"'";

猜你喜欢

转载自alleni123.iteye.com/blog/2007936