1b3704df by chentao

no message

1 parent 2282c555
...@@ -32,6 +32,7 @@ public class AtLeastOneNonNullValidator implements ConstraintValidator<AtLeastOn ...@@ -32,6 +32,7 @@ public class AtLeastOneNonNullValidator implements ConstraintValidator<AtLeastOn
32 field.setAccessible(true); // 设置私有字段可访问,以便读取值 32 field.setAccessible(true); // 设置私有字段可访问,以便读取值
33 System.out.println(field.getName()+"============"+field.get(object)+"!"); 33 System.out.println(field.getName()+"============"+field.get(object)+"!");
34 if (Objects.nonNull(field.get(object))) { // 检查字段是否非空 34 if (Objects.nonNull(field.get(object))) { // 检查字段是否非空
35 System.out.println(field.getName()+"============"+field.get(object)+"&");
35 return true; // 如果至少一个字段非空,返回true 36 return true; // 如果至少一个字段非空,返回true
36 } 37 }
37 } catch (NoSuchFieldException | IllegalAccessException e) { 38 } catch (NoSuchFieldException | IllegalAccessException e) {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!