错误信息: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