不对哦! 报这样的异常:Exception in thread "main" org.hibernate.hql.QueryExecutionRequestException: Not supported for select queries [from com.hongbing.entity.User where userName='accp' and userPass = '111']我感觉hql语句也有点问题 希望你能自己敲一遍 急求…… 解决一定给分哦追问:原来是你啊?回答:呵呵。那就是query.executeUpdate();这个方法的问题了,这个方法返回的是增删改受影响的行数.而你要查的是个结果集。你可以用User user=(U...