发布于 2017-03-25 01:46:44 | 165 次阅读 | 评论: 0 | 来源: 网友投递
Hibernate Validator Bean 验证框架
用Annotations 给类或者类的属性加上约束(constraint),在运行期检查属性值是很优雅的.Hibernate Validator就是这样的一个框架.该框架是十分容易的(就像参考文档中宣称的那样),几乎没有什么学习曲线,Validator 是一个验证框架 不需要和Hibernate的其他部分绑定就可以使用,只要在你的项目中添加Hibernate-annotations.jar库就可以了.
Hibernate Validator 5.4.1.Final 发布了,该版本主要没有大的变更,主要是 bug 的修复。建议升级。
该版本中突出的错误修复:
HV-1088 - Fix a concurrency issue in validator initialization that you probably wouldn’t encounter in a normal usage - you’re supposed to use a shared ConstraintValidatorFactory
which mitigates the issue
HV-1280 - Fix a class loading conflict with Xerces in modular environements (e.g. WildFly)
HV-1252 - Fix an issue with the annotation processor and JavaMoney support. Thanks go to Guillaume Husta for this one.
HV-1253 - A few TYPE_USE mentions had been mistakenly introduced in 5.4 when backporting from 6 (5.4 still supports Java 6)