Hibernate Validator 6.0.13 序言

序言

验证数据是贯穿所有应用程序层(从表示层到持久层)的常见任务。通常在每个层中实现相同的验证逻辑,这既耗时又容易出错。为了避免这些验证的重复,开发人员经常将验证逻辑直接捆绑到域模型中,使域类与验证代码混乱在一起,验证代码实际上是关于类本身的元数据。(layers, from the presentation to the persistence layer. Often the same validation logic is implemented in each layer which is time consuming and error-prone. To avoid duplication of these validations, developers often bundle validation logic directly into the domain model, cluttering domain classes with validation code which is really metadata about the class itself.)

image.png | left | 747x270

JSR 380 - Bean Validation 2.0 定义实体模型和方法验证的元数据模型和API。默认的元数据源是注释,具有通过使用XML覆盖和扩展元数据的能力。API不绑定到特定的应用层或编程模型。它特别不与Web或持久层绑定,并且既可用于服务器端应用程序编程,也可用于富客户端Swing应用程序开发人员。(defines a metadata model and API for entity and method validation. The default metadata source are annotations, with the ability to override and extend the meta-data through the use of XML. The API is not tied to a specific application tier nor programming model. It is specifically not tied to either web or persistence tier, and is available for both server-side application programming, as well as rich client Swing application developers.)

image.png | left | 747x359

Hibernate验证器是JSR 380的参考实现。实现本身以及bean验证API和TCK都是在Apache软件许可证2.0下提供和分发的。(Hibernate Validator is the reference implementation of this JSR 380. The implementation itself as well as the Bean Validation API and TCK are all provided and distributed under the Apache Software License 2.0.)
Hibernate Validator 6 and Bean Validation 2.0 require Java 8 or later.

1、解读Hibernate-Validator官方文档入门篇-播放地址

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值