码上敲享录 > Hibernate常见问题解答 > Error applying BeanValidation relational constraints

Error applying BeanValidation relational constraints

上一章章节目录下一章 2018-03-16已有1728人阅读 评论(0)

错误信息:Error applying BeanValidation relational constraints [org.springframework.web.context.ContextLoader]Context initialization failed


解决方法:

javax.persistence.validation.mode默认情况下是auto的,就是说如果不设置的话它是会自动去你的classpath下面找一个bean-validation**包,但是找不到,所以beanvalitionFactory错误。需要配置文件下加上一句<property name="javax.persistence.validation.mode">none</property>或者

<property name="hibernateProperties">

<props>

<prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>

<prop key="hibernate.dialect">${hibernate.dialect}</prop>

<prop key="hibernate.show_sql">${hibernate.show_sql}</prop>

<prop key="hibernate.format_sql">${hibernate.format_sql}</prop>

<prop key="javax.persistence.validation.mode">none</prop>

</props>

</property>


本文地址:http://www.yayihouse.com/yayishuwu/chapter/1105



向大家推荐《Activiti工作流实战教程》:https://xiaozhuanlan.com/activiti
0

有建议,请留言!

  • *您的姓名:

  • *所在城市:

  • *您的联系电话:

    *您的QQ:

  • 咨询问题:

  • 提 交