pptx小马哥系列8套教程12_第1页
pptx小马哥系列8套教程12_第2页
pptx小马哥系列8套教程12_第3页
pptx小马哥系列8套教程12_第4页
pptx小马哥系列8套教程12_第5页
已阅读5页,还剩10页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

小马哥,Java微服务实践SpringBoot验证,Java微服务实战系列课堂,Java微服务实战系列课堂,课堂资源,议题,Apachecommons-validatorSpringValidatorBeanValidation1.0(JSR-303)ValidationSpringBoot整合问答互动,Apachecommons-validator,介绍Acommonissuewhenreceivingdataeitherelectronicallyorfromuserinputisverifyingtheintegrityofthedata.Thisworkisrepetitiveandbecomesevenmorecomplicatedwhendifferentsetsofvalidationrulesneedtobeappliedtothesamesetofdatabasedonlocale.Errormessagesmayalsovarybylocale.Thispackageaddressessomeoftheseissuestospeeddevelopmentandmaintenanceofvalidationrules.最新版本commons-validator1.6依赖JDK1.6,Apachecommons-validator,功能特性可配置的校验引擎可重用的原生校验手段第三方依赖commons-beanutils:1.9.2commons-digester:1.8.1commons-logging:1.2commons-collections:3.2.2设计模式单例模式(GoF23)校验器模式,Apachecommons-validator,验证器类型Date与Time校验器数值校验器正则表达式校验器ISBN校验器IP地址校验器邮件地址校验器URL校验器域名校验器,Apachecommons-validator,Date与Time校验器APImons.validator.routines.DateVmons.validator.routines.CalendarVmons.validator.routines.TimeValidator使用场景校验格式化时区比较,Apachecommons-validator,数值校验器(Numberic)APImons.validator.routines.ByteVmons.validator.routines.ShortVmons.validator.routines.IntegerVmons.validator.routines.LongVmons.validator.routines.FloatVmons.validator.routines.DoubleVmons.validator.routines.BigIntegerVmons.validator.routines.BigDecimalVmons.validator.routines.CurrencyValidator,Apachecommons-validator,其他校验器APImons.validator.routines.RegexVmons.validator.routines.CodeVmons.validator.routines.ISBNVmons.validator.routines.InetAddressVmons.validator.routines.EmailVmons.validator.routines.UrlVmons.validator.routines.DomainNameValidator,SpringValidator,介绍SpringFramework提供了用于校验对象的Validator接口,在校验过程中,与Errors对象配合。校验器可以通过Errors对象报告校验失败的信息。接口定义,SpringValidator,实现模式实现org.springframework.validation.Validator接口实现supports方法判断是否需要支持校验当方法返回false时,视作不予校验实现validate方法,判断target参数是否校验合法当校验非法时,通过Errors对象返回实现MessageCodesResolver或重用框架实现,完成错误信息编码化辅助使用工具类ValidationUtils,辅助通用校验逻辑,BeanValidation1.0(JSR-303),介绍JavaAPIforJavaBeanvalidationinJavaEEandJavaSE.ThetechnicalobjectiveofthisworkistoprovideaclasslevelconstraintdeclarationandvalidationfacilityfortheJavaapplicationdeveloper,aswellasaconstraintmetadatarepositoryandqueryAPI.规范版本2009.10.12BeanValidation1.0(JSR-303)2013.04.10BeanValidation1.1(JSR

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论