diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/dynamic/DynamicEntity.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/dynamic/DynamicEntity.java index 15c744f..91b8cd0 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/dynamic/DynamicEntity.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/dynamic/DynamicEntity.java @@ -112,8 +112,12 @@ public class DynamicEntity extends BaseBean implements Serializable { try { val = getValue(propName,val); // LOGGER.error("设置动态对象属性值 attr name:{} -> value:{} ",setMethodName,val); - Method setMethod = this.getClass().getDeclaredMethod(setMethodName, new Class[]{val.getClass()}); - setMethod.invoke(this, val); + if(val != null){ + Method setMethod = this.getClass().getDeclaredMethod(setMethodName, new Class[]{val.getClass()}); + setMethod.invoke(this, val); + }else{ + LOGGER.error("设置动态对象属性值 attr name:{} -> value:{} ",setMethodName,val); + } } catch (NoSuchMethodException e) { // LOGGER.error("没有方法:{}",setMethodName,e); LOGGER.error("没有方法:{}",setMethodName);