【问题标题】:Cannot resolve Neo4j annotations in Eclipse无法在 Eclipse 中解析 Neo4j 注释
【发布时间】:2015-11-25 00:41:41
【问题描述】:

我正在尝试使用 Maven 在 Eclipse 中导入各种 Neo4j 注释

我有

<dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-neo4j</artifactId>
    <version>4.0.0.RELEASE</version>
</dependency>

但我明白了:

The import org.springframework.data.neo4j.annotation.Fetch cannot be resolved

当我尝试导入 @Fetch@RelatedTo@GraphId 时。奇怪的是,eclipse 显示注解 @Query@QueryResult 存在于 org.springframework.data.neo4j.annotation 中,但只有这两个注解没有其他注解。我能找到的所有文档都说注释应该在那里,但它看起来是不是。

【问题讨论】:

    标签: java eclipse spring maven spring-data-neo4j


    【解决方案1】:

    我下载了 spring-data-neo4j.jar,将其解压缩,但似乎没有注释。我换到了 3.4.1 版本,一切正常。

    更新。

    这个问题实际上是因为在 Spring 网站上使用 neo4j 的快速入门示例实际上使用了 Neo4j 4 不再支持的注释,同时显示了作为 Neo4j 4 使用的依赖关系。

    Neo4J 4 不再使用这些注释。

    【讨论】:

      猜你喜欢
      • 2020-03-01
      • 2021-06-23
      • 2020-11-24
      • 2020-04-21
      • 2021-06-22
      • 2017-02-17
      • 2012-08-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多