测试spring和Hibernate的整合,报错: “Unable to get the default Bean Validation”
来源:互联网 发布:西安交大大数据学院 编辑:程序博客网 时间:2024/06/04 18:44
javax.persistence.validation.mode默认情况下是auto的,就是说如果不设置的话它是会自动去你的classpath下面找一个bean-validation**包,但是找不到,所以beanvalitionFactory错误。 由于javax.persistence.validation.mode的属性值默认是auto,所以会出错。 在hibernate.cfg.xml里将javax.persistence.validation.mode设置为none,就可以避免出错了。 <!-- Disable the BeanValidation --> <property name="javax.persistence.validation.mode">none</property>
------------------------------------------------------------------------------------------------------------------------------------------
所以,Hibernate 3.6以上版本在用junit测试时会提示错误:
Unable to get the default Bean Validation factory
在hibernate.cfg.xml里增加一属性解决:
<property name="javax.persistence.validation.mode">none</property>
0 0
- 测试spring和Hibernate的整合,报错: “Unable to get the default Bean Validation”
- Spring与Hibernate整合报错:unable to get the default bean validation
- hibernate和spring整合:Unable to get the default Bean Validation factory
- spring整合hibernate出现HibernateException: Unable to get the default Bean Validation factory
- spring整合hibernate出现HibernateException: Unable to get the default Bean Validation factory
- 【转】SSH 整合 junit报错 Unable to get the default Bean Validation factory
- Spring整合两大框架beans.xml中报unable to get the default bean Validation factory
- SSH 整合报错处理记录---Unable to get the default Bean Validation factory
- 整合ssh时候报 Unable to get the default Bean Validation factory
- Hibernate异常: Unable to get the default Bean Validation factory
- Unable to get the default Bean Validation
- Unable to get the default Bean Validation
- Unable to get the default Bean Validation
- hibernate 错误:org.hibernate.HibernateException: Unable to get the default Bean Validation factory
- hibernate 错误:org.hibernate.HibernateException: Unable to get the default Bean Validation factory
- hibernate :org.hibernate.HibernateException: Unable to get the default Bean Validation factory
- 【转】hibernate 错误:org.hibernate.HibernateException: Unable to get the default Bean Validation factory
- 1. hibernate 错误:org.hibernate.HibernateException: Unable to get the default Bean Validation factory
- HDU 2204 - Eddy's爱好- 容斥原理
- 题目1001:A+B for Matrices
- ios 简单的block传值
- 求职之计算机网络
- 高中OJ3012. 【NOIP2012模拟10.6】购买
- 测试spring和Hibernate的整合,报错: “Unable to get the default Bean Validation”
- MVP
- Struts2学习——0400ActionWildCard通配符配置
- 访问国际英文版google
- 中文字符处理 python
- 一键设置Java环境变量
- 机器学习(Machine Learning)&深度学习(Deep Learning)资料(下)
- Android开机过程
- XML解析-SAX方式