@Test public void testValidate() { User user = new User(); user.setRealName("a"); try { ValidateUtils.validate(user); } catch (Exception e) { String str = e.getMessage(); assertEquals(str, "用户id不能为空"); } }
public static <T> void validate(T bean, Class<?>... groups) { validate(bean, true, groups); }
ValidateUtils { public static <T> void validate(T bean, Class<?>... groups) { validate(bean, true, groups); } }
ValidateUtils { public static <T> void validate(T bean, Class<?>... groups) { validate(bean, true, groups); }  }
ValidateUtils { public static <T> void validate(T bean, Class<?>... groups) { validate(bean, true, groups); }  static void validate(T bean, Class<?>... groups); static void validate(T bean, boolean flag, Class<?>... groups); }
ValidateUtils { public static <T> void validate(T bean, Class<?>... groups) { validate(bean, true, groups); }  static void validate(T bean, Class<?>... groups); static void validate(T bean, boolean flag, Class<?>... groups);  }