public boolean checkObjFieldIsNull(Object obj) throws IllegalAccessException {
boolean flag = false;
for(Field f : obj.getClass().getDeclaredFields()){
f.setAccessible(true);
log.info(f.getName());
if(f.get(obj) == null){
flag = true;
return flag;
}
}
return flag;
}
原文地址:https://www.cnblogs.com/ggqzz/p/8421720.html
时间: 2024-11-10 13:10:24