直接强转不行,这么转 Object o=query.uniqueResult(); int a=Integer.parseInt(String.valueOf(o)); 转载于:https://www.cnblogs.com/fengnan/p/9311961.html