java - Hibernate 4 Validator with Hibernate 3 validation annotations -


By having a standardized value evaluator like the javax package in the manual

  Validate Validator = Validation .buildDefaultValidatorFactory (). GetValidator ();  The org.hibernate.validator  package will not recognize the old validator annotation, is there no alternative to working with Hibernate 4Valitor without a reFactor? The whole project? 

We used Hibernate until we decided to switch our project to Hibernate 4. Due to standardization, it is possible to use this class with Hibernate 4 Volater.

So anyone has the old validator how to stay with annotations, but still get valid classes in the scope of the project without having to restructure and modify the entire source code? Any help appreciated.

There is no way to do this. You must move your annotations / constraints The Hibernate Validate 3 code base is obsolete and there is no further development on this version of the Validator.

The Hibernate Valleyator 4.x (and later) release Valenator 3 does not recognize annotation as a lack of legalization. The necessary obstacle marker annotation in these constraints is not.

Migration in the comments should not really be a big problem. In most cases you will only be able to change the package.


Comments