1

I am working on linking a Neo4J database to a spring-data application. I would like to add an annotation @QueryResult to a class but it says java: cannot find symbol. And, I cannot import org.springframework.data.neo4j.annotation

In my pom.xml I have :

<dependency>
     <groupId>org.springframework.boot</groupId>
     <artifactId>spring-boot-starter-data-neo4j</artifactId>
</dependency>

Thank you for your help and answers.

Iza
  • 11
  • 1
  • I hope this link : https://stackoverflow.com/a/38739787/7199780 may be helpful. – Yuvaraj S Apr 09 '21 at 15:07
  • 1
    The link refers to a very outdated answer. Spring Data Neo4j is at version 6 now, which is completely different from the previous major versions. – fbiville Apr 09 '21 at 16:49

1 Answers1

0

I assume you are using (the latest release of) Spring Boot. In that case, you are using Spring Data Neo4j 6 and @QueryResult is not defined anymore. You can achieve projections as described there.

fbiville
  • 8,407
  • 7
  • 51
  • 79