javax.validation.ConstraintViolationException
... 71 more
Caused by: javax.validation.ConstraintViolationException: validation failed for
classes [cn.com.softvan.travelb2b.domain.TravelLine] during persist time for gro
ups [javax.validation.groups.Default, ]
就是在实体的get方法中添加了Validate校验,但是在update和保存时没有调用hibernate的validate校验,仍然会报以上错误,并且会去校验。解决办法是在hibernate.property配置文件中添加这样一句:
avax.persistence.validation.mode=none
就可以解决。