问题描述
我是新来的休眠者,不太确定我的应用程序出了什么问题.所以我有以下两个模块:核心和网站.
Im new to hibernate, and not quite sure what is wrong with my application.So i have these 2 modules: Core and Website.
- 模块核心具有所有实体,dao和所有数据库工作.所有DAO都继承AbstractDAO.
- Module网站执行所有前端工作,例如jsps,mvc控制器...这是一个支持spring框架的maven模块.
我正在尝试使用ehcache工厂实现二级缓存.但是我收到此错误:
Im trying to implement second level cache using ehcache factory. however i'm receiving this error:
当我添加logback-classic.jar时出现错误,但是如果我删除它,则会收到另一个错误.
The error appears when I add logback-classic.jar, but if i remove it i receive another error.
我不知道为什么会出现错误.它表明存在一个spring框架错误,其中spring没有在Core模块中实现(所有DAO都在其中).任何建议将不胜感激.谢谢
I don't know why the error is appearing. it shows that there is a spring framework error, where spring is not implemented in module Core ( where all the DAOs are). Any advice would be much appreciated.Thanks
推荐答案
如果您使用的是hibernate-validator,在我的情况下,我仅添加了一个如下所示的依赖项:(因为javax.xml.bind在在Java 9和更高版本中,默认情况下是classpath,请参考 https://docs.oracle.com/javase/9/docs/api/java.xml.bind-summary.html )
If you are using hibernate-validator, in my case, I just added one more dependency as below: (because javax.xml.bind will not be available on classpath by default in JAVA 9 and above, please refer to https://docs.oracle.com/javase/9/docs/api/java.xml.bind-summary.html)
这篇关于创建名称为'org.springframework.validation.beanvalidation.OptionalValidatorFactoryBean#0的bean时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!