其他分享
首页 > 其他分享> > hibernate validator

hibernate validator

作者:互联网

Preface
Validating data is a common task that occurs throughout any application, from the presentation layer to the persistence layer. Often the same validation logic is implemented in each layer, proving time consuming and error-prone. To avoid duplication of these validations in each layer, developers often bundle validation logic directly into the domain model, cluttering domain classes with validation code which is really metadata about the class itself.

JSR 303 - Bean Validation - defines a metadata model and API for entity validation. The default metadata source is 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 or programming model. It is specifically not tied to either the web tier or the persistence tier, and is available for both server-side application programming, as well as rich client Swing application developers.

Hibernate Validator is the reference implementation of this JSR. The implementation itself as well as the Bean Validation API and TCK are all provided and distributed under the Apache Software License 2.0.

lynchyueliu 发布了24 篇原创文章 · 获赞 0 · 访问量 4321 私信 关注

标签:layer,hibernate,metadata,application,API,tier,validation,validator
来源: https://blog.csdn.net/lynchyueliu/article/details/104397502