摘要: 一、问题来源 (1)主要可能是在查询数据库的时候,会返回空对象,那么在没对其处理就直接使用,可能会发生意料之外的灾难。 eg, User other = userService.getUserByID(user.getId()); //用户已存在 if(other!=null && other.ge 阅读全文
posted @ 2021-01-09 11:33 An_One 阅读(143) 评论(0) 推荐(0)