我做了“右键单击项目>配置>转换为Gradle项目”,然后出现错误:
The method getMaxEntriesLocalHeap() is undefined for the type CacheConfiguration CacheService.java
我不明白为什么会这样。
当我下载ehcache-core-2.6.0-source.jar时,该方法就在那里。
非常感谢任何帮助。
最好的祝福,
错义
最佳答案
问题出在依赖项上。我将'ehcache-core-2.4.3.jar'拉为'org.hibernate:hibernate-ehcache:4.1.9.Final'的传递依赖项。
解决方案是在项目build.gradle文件中排除传递依赖,如下所示:
configurations{
all*.exclude group: 'net.sf.ehcache', module: 'ehcache-core'
}
关于eclipse - 将项目转换为Gradle项目后,为什么为什么缺少CacheConfiguration.getMaxEntriesLocalHeap()方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28831728/