我刚刚从Spring Data Neo4j 4.1.3
更新到了4.2.7
但是,在更改Maven依赖项后,我无法使我的项目重新运行起来。
我已经按照这个教程描述中的方法解决了很多问题:https://graphaware.com/neo4j/2016/09/30/upgrading-to-sdn-42.html 但我无法弄清楚为什么会出现这个问题。
在我的服务中 > GenericService.java > createOrUpdate
...
@Override
public T createOrUpdate(T entity) {
getRepository().save(entity, DEPTH_ENTITY_NEXT); //ERROR LINE
if (entity instanceof Entity)
return find(((Entity) entity).getId());
else if (entity instanceof GraphType)
return find(((GraphType) entity).getId());
else
return find(((DataType) entity).getId());
}
...
现在,getRepository代码行会出现以下错误:
The method save(T, int) is ambiguous for the type
GraphRepository<T>
仅仅保存图形库似乎出现错误。
更新
如果我尝试使用Maven构建项目,即使Eclipse显示错误,也会打印出这个错误:
Caused by: java.io.FileNotFoundException: class path resource [org/springframework/data/neo4j/config/Neo4jConfiguration.class] cannot be opened because it does not exist