【问题标题】:Problem with @Indexed annotations in hibernate search休眠搜索中@Indexed 注释的问题
【发布时间】:2011-03-20 15:17:48
【问题描述】:

我实际上是在尝试在 J2EE 应用程序中部署 HibernateSearch。我已经导入了一些我在 tuto 上看到的依赖项:

<!-- HIBERNATE DEPENDENCIES -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>${commons-dbcp.version}</version>
</dependency>

<!-- Hibernate Search -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search</artifactId>
<version>3.1.0.GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>3.3.0.ga</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.4.0.GA</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers</artifactId>
<version>3.0.3</version>
</dependency>

我的问题是,为了继续,我需要将 @Indexed 注释放在我的实体类中,但我无权访问此注释(Eclipse 不知道它,当然,它没有通过编译)

您能给我一些建议或指导吗?也许我没有很好的依赖关系?

【问题讨论】:

    标签: hibernate-search indexed


    【解决方案1】:

    我不使用 Eclipse 或 Maven,但我可以确认在我使用 Hibernate Search 3.3.0 的项目中,Indexed 注释确实存在于 hibernate-search-3.3.0.Final JAR 中。尝试更新您的依赖项以使用最新的 JAR。不过,您绝对不需要使用此注解。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-09-23
      • 1970-01-01
      相关资源
      最近更新 更多