Spring JUnit org.hibernate.HibernateException: Unable to get the default Bean Validation factory

时间:2021-08-27 14:29:54

org.hibernate.HibernateException: Unable to get the default Bean Validation factory

<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<!--ORACLE方言
<prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop>
-->
<!--<prop key="hibernate.hbm2ddl.auto">update</prop>-->
<prop key="hibernate.show_sql">false</prop>
<prop key="hibernate.format_sql">false</prop>
<prop key="hibernate.current_session_context_class">
org.springframework.orm.hibernate3.SpringSessionContext</prop>
<prop key="javax.persistence.validation.mode">none</prop>   增加此行配置
</props>
</property>