内容简介:Hibernate Validator 6.0.17.Final 发布了,该版本包含很多 bug 的修复,建议用户尽快升级。 完整的改进记录请看 JIRA. 用Annotations 给类或者类的属性加上约束(constraint),在运行期检查属性值是很优雅的.Hibe...
Hibernate Validator 6.0.17.Final 发布了,该版本包含很多 bug 的修复,建议用户尽快升级。
完整的改进记录请看 JIRA.
用Annotations 给类或者类的属性加上约束(constraint),在运行期检查属性值是很优雅的.Hibernate Validator就是这样的一个框架.该框架是十分容易的(就像参考文档中宣称的那样),几乎没有什么学习曲线,Validator 是一个验证框架 不需要和Hibernate的其他部分绑定就可以使用,只要在你的项目中添加Hibernate-annotations.jar库就可以了.
示例代码:
public class Address { @NotNull private String line1; private String line2; private String zip; private String state; @Length(max = 20) @NotNull private String country; @Range(min = -2, max = 50, message = "Floor out of range") public int floor; ... }
以上所述就是小编给大家介绍的《Hibernate Validator 6.0.17.Final 发布》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Distributed Algorithms: An Intuitive Approach
Wan Fokkink / MIT Press / 2018-2-2 / USD 48.00
The new edition of a guide to distributed algorithms that emphasizes examples and exercises rather than the intricacies of mathematical models. This book offers students and researchers a guide to ......一起来看看 《Distributed Algorithms: An Intuitive Approach》 这本书的介绍吧!