java.lang.IllegalArgumentException: Source must not be null
ProductManagementAppEntity entity = Mapper.selectOne(
new QueryWrapper
Resp resp=new Resp();
if (entity != null){
BeanUtil.copyProperties(entity,resp);
}
return ResponseUtil.ok(resp);
我的这个错误原因在于查询数据库没有查到数据,返回值为空,使用工具转换时异常了。如果是自己封装的类转换工具类的话,记得把判空加上。
还没有评论,来说两句吧...