validation-api与hibernate-validator;@Validated与@Valid
重写校验类Validator,可自定义获取校验信息:@ComponentpublicclassValidatorUtilimplementsApplicationContextAware{//通过Spring获得校验器privatestaticValidatorvalidator;@OverridepublicvoidsetApplicationContext(ApplicationContext