摘要: 错误为getSingleResult();获取值时获取不到报异常。 getSingleResult的源码有一句: @throws EntityNotFoundException if there is no result查不到结果时,它是抛异常的,不会返回null.解决方式,将异常捕捉try{Que 阅读全文
posted @ 2017-03-23 14:09 Claricre 阅读(1854) 评论(0) 推荐(0)